-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add advisory lock for registry cache db (#1712)
`redb` will try to lock the db file, with exclusive lock. When exclusive lock cannot be acquired (e.g. when another Scarb process is using the db file simultaneously), Scarb will then remove the file completely and try to recreate it. This PR adds an advisory lock which synchronizes access to the db file between Scarb processes, so the lock can always be acquired. https://github.com/cberner/redb/blob/9ffa1d13dad343a8937a55540424dcfa45375a09/src/tree_store/page_store/file_backend/unix.rs#L37
- Loading branch information
Showing
1 changed file
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters