-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure quick-repair commit on shutdown
Traditionally, redb has stored its allocator state in the region headers and region tracker page, which are only valid after a clean shutdown. Now that we also have the allocator state table (which works even after a crash), it would be nice to use that exclusively. This is the first step in that transition: making sure that after a clean shutdown, the allocator state is saved to both places. Then, once enough time has passed, we can remove all support for reading and writing the old allocator state. Even after the transition, any redb version will be able to open any database. If the database has been opened at least once during the transition period, it'll open cleanly; otherwise it'll require repair, but it'll always work.
- Loading branch information
Showing
3 changed files
with
66 additions
and
24 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
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