Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-30
toolchain: nightly-2025-09-28
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.9

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-30
toolchain: nightly-2025-09-28
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.9

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ genawaiter = { version = "0.99.1", features = ["futures03"] }
iroh-base = "0.92"
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 }
Copy link
Collaborator

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?

Copy link
Member Author

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.

reflink-copy = { version = "0.1.24", optional = true }

[dev-dependencies]
Expand Down
9 changes: 7 additions & 2 deletions src/store/fs/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mod proto;
pub use proto::*;
pub(crate) mod tables;
use tables::{ReadOnlyTables, ReadableTables, Tables};
use tracing::{debug, error, info_span, trace, Span};
use tracing::{debug, error, info, info_span, trace, warn, Span};

use super::{
delete_set::DeleteHandle,
Expand Down Expand Up @@ -475,13 +475,18 @@ impl Actor {
options: BatchOptions,
) -> anyhow::Result<Self> {
debug!("creating or opening meta database at {}", db_path.display());
let db = match redb::Database::create(db_path) {
let mut db = match redb::Database::create(db_path) {
Ok(db) => db,
Err(DatabaseError::UpgradeRequired(1)) => {
return Err(anyhow::anyhow!("migration from v1 no longer supported"));
}
Err(err) => return Err(err.into()),
};
match db.upgrade() {
Ok(true) => info!("Database was upgraded to redb v3 compatible format"),
Ok(false) => {}
Err(err) => warn!("Database upgrade to redb v3 compatible format failed: {err:#}"),
}
let tx = db.begin_write()?;
let ftx = ds.begin_write();
Tables::new(&tx, &ftx)?;
Expand Down
Loading