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

Data Store: Multi-Process Concurrent Access Data Integrity #2

Open
rtamalin opened this issue May 31, 2024 · 0 comments
Open

Data Store: Multi-Process Concurrent Access Data Integrity #2

rtamalin opened this issue May 31, 2024 · 0 comments
Labels
Client Data Store enhancement New feature or request

Comments

@rtamalin
Copy link
Collaborator

The Client Data Store implementation is based upon Sqlite3, and per the faq we should be using file locking to ensure that multiple processes attempting to update the data store concurrently don't corrupt the data base.

Short lived operations that are just querying the data store content should be read locking the backing DB file for the duration of their run.

Longer lived operations that may be updating the data store content after querying it should be write locking the backing DB file for just the duration of those operations, but shouldn't rely on previously fetched data for follow on actions.

Potentially use something like the gofrs/flock or roll our own based upon the Linux syscall.flock()

@rtamalin rtamalin added enhancement New feature or request Client Data Store labels May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Data Store enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant