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

fix: re-implement lock for DBMixin #9

Open
ClemDoum opened this issue Jun 19, 2024 · 0 comments
Open

fix: re-implement lock for DBMixin #9

ClemDoum opened this issue Jun 19, 2024 · 0 comments
Assignees

Comments

@ClemDoum
Copy link
Contributor

Bug description

On some OS, there seem to be race conditions in the JSON DB serialized on the filesystem leading to failures such as this one.

To avoid read/writing to the DB at the same time, the DBMixin should read/write with lock.
This behavior was implemented earlier with a thread.Lock but has been remove has the lock is not serializable accross processes and hence don't worker properly with multiprocessing workers.

Leveraing filelock could be a potential fix for this issue.

@ClemDoum ClemDoum self-assigned this Jun 19, 2024
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

1 participant