Skip to content

[3.18.x] Try to acquire file lock when closing DB #5495

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

Merged
merged 1 commit into from
May 6, 2024

Conversation

vpodzime
Copy link
Contributor

@vpodzime vpodzime commented May 6, 2024

To prevent multiple processes from opening/closing the DB at the same time. From what we have seen, the Invalid argument issues only happen when multiple processes try to work with the DB, multiple threads inside a single process don't seem to hit the trigger.

Also, we have seen that the issues happen when LMDB tries to use a robust (shared inter-process) mutex that was already destroyed.

Ticket: ENT-11543
Changelog: CFEngine processes no longer suffer from the "Invalid
argument" issues when working with LMDB

To prevent multiple processes from opening/closing the DB at the
same time. From what we have seen, the *Invalid argument* issues
only happen when multiple processes try to work with the DB,
multiple threads inside a single process don't seem to hit the
trigger.

Also, we have seen that the issues happen when LMDB tries to use
a robust (shared inter-process) mutex that was already destroyed.

Ticket: ENT-11543
Changelog: CFEngine processes no longer suffer from the "Invalid
           argument" issues when working with LMDB
@vpodzime
Copy link
Contributor Author

vpodzime commented May 6, 2024

backport of #5492

@vpodzime vpodzime merged commit 04e26e9 into cfengine:3.18.x May 6, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant