-
Notifications
You must be signed in to change notification settings - Fork 137
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
Storage: implement read/write locks for calls to the LMDB backend #148
Comments
This may be related to wallet (non)locking: mimblewimble/grin#2868 |
I think this may be desirable to do as part of #244, however there isn't currently any clean delineation in the code between what operations update and what operations just read. (All operations do a mix of both) I think it might be better to consider |
This has been de-scoped of 3.0.0 following dev meeting today. |
Possibly related to grin/issue#2868, only one caller should have write access to the wallet db at once. If possible, multiple readers can be allowed with a read-write lock.
This would eliminate implementer/users needing to be concerned with the warning about single-access during
check_restore
. With a read-write lock, write calls will need to wait on the lock, but multiple reader calls can be made simultaneously.Another possibility (discussed with @bladedoyle and @DavidBurkett on gitter) is to implement a file-based lock that is acquired by
check_restore
, disallowing access by any other callers.The text was updated successfully, but these errors were encountered: