Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable quick-repair for testing #4084

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

partialord
Copy link
Contributor

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!

@casey
Copy link
Collaborator

casey commented Nov 17, 2024

Very nice! I just deployed it to charlie for testing.

@casey
Copy link
Collaborator

casey commented Nov 18, 2024

Just tried it out by kill -9'ing ord a bunch. Works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants