fix: re-implement lock for `DBMixin`
Open
@ClemDoum is already working on this.
Since Jun 19, 2024.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.