-
Notifications
You must be signed in to change notification settings - Fork 231
protect database with flock #1823
Copy link
Copy link
Closed
Labels
Milestone
Description
We got a report of database corruption with v2.7.0. It's not entirely clear what happened but it's possible that two instances of Ergo were running concurrently, resulting in interleaving of updates to buntdb's append-only log.
Suggestion:
- Pull in https://github.com/gofrs/flock
- Wrap it in a package
irc/flockwith build flags that make it a no-op on unsupported platforms - Acquire an exclusive flock on the buntdb database when opening it
Reactions are currently unavailable