Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in local mongo #5

Open
ilia-nikiforov-umn opened this issue May 1, 2023 · 2 comments
Open

Race condition in local mongo #5

ilia-nikiforov-umn opened this issue May 1, 2023 · 2 comments
Assignees

Comments

@ilia-nikiforov-umn
Copy link
Contributor

If you run multiple pipeline-run-pair utilities in parallel, there will be a race condition in the local mongo files that causes some results not to write. This is also relevant to #1, as we are having renewed discussion regarding publishing KIM tests and VCs as a standalone package. If that package will include a local mongo, this will come up again.

I think a basic solution would be to write multiprocessing versions of pipeline-run-* commands that lock (this would have to propagate through a few calls to get to every place db is updated in mongodb.py).

@ilia-nikiforov-umn ilia-nikiforov-umn self-assigned this May 1, 2023
@dskarls
Copy link
Contributor

dskarls commented May 1, 2023

Can you give a specific example of such a race condition? I would've thought that Mongo was already using exclusive locks to prevent dirty writes.

@ilia-nikiforov-umn
Copy link
Contributor Author

ilia-nikiforov-umn commented May 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants