-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
advise: make the bolt database do the atomic rename dance
Before this change, `advise.Create` was opening the commands database and holding it open while querying the store and repopulating it, which blocked concurrent read-only clients (as returned by `advise.Open`). This change instead has `advise.Create` write to a new database every time, which is then renamed after Close using the atomic dance. This together with the 1s timeout on `advise.Open` should minimise the unavailability of `snap advise` results that were impacting the apt integration test (and, possibly, users).
- Loading branch information
Showing
2 changed files
with
44 additions
and
19 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
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