-
Notifications
You must be signed in to change notification settings - Fork 21
feat: upgrade database to redb v3 compatible format #174
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code seems fine. Have you tried it out with a real db?
Given that blobs 9.x is still marked as non production ready I think we should definitely do this, but doing one quick manual test would be good.
|
Yes, I tried with the |
| irpc = { version = "0.8.0", features = ["rpc", "quinn_endpoint_setup", "spans", "stream", "derive"], default-features = false } | ||
| iroh-metrics = { version = "0.35" } | ||
| redb = { version = "=2.4", optional = true } | ||
| redb = { version = "2.6.3", optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this version 2.x and later we call it v3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From redb 2.6 Database::upgrade exists and changes the database format into a forward-compatible format that works both with redb v2.6+ and redb v3. The upgrade code is only part of redb v2, it was removed in v3, which only works with the upgraded format. So we have to do the upgrade with redb v2.6, and can then upgrade to v3 in the next release after the next.
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-blobs/pr/174/docs/iroh_blobs/ Last updated: 2025-09-30T07:37:47Z |
Description
The recently released redb v3 has incompatible changes to the database format. The recommended upgrade procedure is to upgrade the database with
Database::upgradeon redb v2.6+. The upgrade has to be done on redb v2, not v3. See https://github.com/cberner/redb/blob/master/CHANGELOG.md#removes-support-for-file-format-v2.This updates redb to 2.6 and performs the upgrade when opening the database. Calling upgrade on an already upgraded database is a no-op.
With this merged in the next release, we can then update redb to v3 in the version after.
Breaking Changes
Notes & open questions
Change checklist