Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enables redb's new quick-repair mode so you can try it out. It's using redb master, since this version hasn't been released yet.
Recovery after a crash always means rolling back to the last complete commit; if that commit was made with quick-repair enabled, then recovery will be instant. So to get the new behavior, you'll need to let it make one successful commit with the new code before you start making it crash. After that, no matter what you do, you should never have to wait for repair again. You can tell it's working because it won't print the "Index file needs recovery" message, even after a crash; it'll just look like a normal clean startup.
Quick-repair mode needs to save the database allocator state with each commit, which costs about 200 ms per commit for a 190 GB database (it scales linearly with file size). My guess is that's totally fine, so for now quick-repair is unconditionally enabled for all writes to the database.
If you try this out, let me know how it goes!