-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description `redb` 2.0.0 was released: https://github.com/cberner/redb/releases/tag/v2.0.0 most relevant for us: > 2.0.0 uses a new file format that optimizes len() to be constant time. This means that it is not backwards compatible with 1.x. To upgrade, consider using a pattern like that shown in the [upgrade_v1_to_v2](https://github.com/cberner/redb/blob/222a37f4600588261b0983eebcd074bb69d6e5a0/tests/backward_compatibility.rs#L282-L299) test. and some nice API changes that will simplify the iroh-sync codebase (no more ouroboros for self-refential structs needed!) > * Remove lifetimes from read-only tables > * Remove lifetime from WriteTransaction and ReadTransaction and some further API changes, see the notes. --- * [x] Update iroh-bytes to redb v2 * Did some crude search&replaces to remove now unneeded lifetime bounds. Compiles now, let's see what test says. * [x] Migration for iroh-bytes db * Code adapted from here https://github.com/n0-computer/migrate-bao-store-redb/blob/main/src/main.rs * [x] Update iroh-sync to redb v2 * This will be a bit more involved as iroh-bytes because we hit more API changes, but also great because we can remove `ouroborous` because iterators can now own a range * [x] Migration for iroh-sync db The migrations likely need a dependency to redb v1 to read the old database, so at least for one release cycle we'll have to depend on both redb v2 and v1. ## Notes & open questions This currently includes an extra-safeguard by preserving the old databases for sync and blobs as `docs.redb.backup-redb-v1` and `blobs.db-backup-redb-v1` - do we want this or delete the backups after successfull migration? ## Change checklist - [x] Self-review. - [ ] Documentation updates if relevant. - [ ] Tests if relevant. --------- Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
- Loading branch information
1 parent
314c883
commit ceaf168
Showing
14 changed files
with
692 additions
and
383 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.