You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2023. It is now read-only.
When running several instances of dbdeployer in parallel, sometimes there is a race condition while updating the catalog file.
dbdeployer deals well with concurrent operations inside the program. Multiple sandbox deployments are handled correctly. The problem occurs when several instances of dbdeployer are trying to update the catalog at the same time. Then, it is possible that one of the operations can be overwritten by a concurrent one.
Expected behavior
The catalog should have the same number of sandboxes as the ones found on disk.
Sometimes, rarely, but noticeably, the catalog has one sandbox less than expected.
Sample successful run:
running
deployed:
name type version ports
---------------------------- -------------- --------- ----------------------
first : multiple 5.0.96 [5101 5102 5103 ]
msb_5_0_96 : single 5.0.96 [5096 ]
rsandbox_5_0_96 : master-slave 5.0.96 [25697 25698 25699 ]
second : multiple 5.0.96 [5201 5202 5203 ]
third : multiple 5.0.96 [5301 5302 5303 ]
catalog
name version type nodes ports
----------------- --------- -------------- ------- ----------------------
third 5.0.96 multiple 3 [5301 5302 5303 ]
first 5.0.96 multiple 3 [5101 5102 5103 ]
msb_5_0_96 5.0.96 single 0 [5096 ]
rsandbox_5_0_96 5.0.96 master-slave 3 [25697 25698 25699 ]
second 5.0.96 multiple 3 [5201 5202 5203 ]
Found 5 entries in catalog as expected
List of deployed sandboxes:
/Users/gmax/sandboxes/first
/Users/gmax/sandboxes/msb_5_0_96
/Users/gmax/sandboxes/rsandbox_5_0_96
/Users/gmax/sandboxes/second
/Users/gmax/sandboxes/third
Sample failure:
running
deployed:
name type version ports
---------------------------- -------------- --------- ----------------------
first : multiple 5.0.96 [5101 5102 5103 ]
msb_5_0_96 : single 5.0.96 [5096 ]
rsandbox_5_0_96 : master-slave 5.0.96 [25697 25698 25699 ]
second : multiple 5.0.96 [5201 5202 5203 ]
third : multiple 5.0.96 [5301 5302 5303 ]
catalog
name version type nodes ports
-------- --------- ---------- ------- -------------------
second 5.0.96 multiple 3 [5201 5202 5203 ]
third 5.0.96 multiple 3 [5301 5302 5303 ]
Found 2 entries in catalog, but expected 5
Possible solutions
Introducing a file-base locking mechanism that should prevent concurrent dbdeployer instances from overwriting competing operations.
The text was updated successfully, but these errors were encountered:
When running several instances of dbdeployer in parallel, sometimes there is a race condition while updating the catalog file.
dbdeployer deals well with concurrent operations inside the program. Multiple sandbox deployments are handled correctly. The problem occurs when several instances of dbdeployer are trying to update the catalog at the same time. Then, it is possible that one of the operations can be overwritten by a concurrent one.
To Reproduce
Expected behavior
The catalog should have the same number of sandboxes as the ones found on disk.
Sometimes, rarely, but noticeably, the catalog has one sandbox less than expected.
Sample successful run:
Sample failure:
Possible solutions
Introducing a file-base locking mechanism that should prevent concurrent dbdeployer instances from overwriting competing operations.
The text was updated successfully, but these errors were encountered: