diff --git a/Cargo.lock b/Cargo.lock index aeadb7866..a9fac1098 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9503,6 +9503,7 @@ dependencies = [ "clap", "const-str", "datafusion", + "faster-hex", "flatbuffers", "flate2", "futures", diff --git a/crates/ecstore/src/store/mod.rs b/crates/ecstore/src/store/mod.rs index b2f2965f6..78193c700 100644 --- a/crates/ecstore/src/store/mod.rs +++ b/crates/ecstore/src/store/mod.rs @@ -707,6 +707,10 @@ impl std::fmt::Debug for ECStore { /// These delegate to the process-global statics. No local state — the globals /// remain the single source of truth until the migration is complete. impl ECStore { + pub fn instance_ctx(&self) -> &Arc { + &self.ctx + } + /// Every erasure set across all pools, pool-major order. /// /// Read-only queries that must consult each set's own copy of a diff --git a/rustfs/Cargo.toml b/rustfs/Cargo.toml index aabf2d865..9cfd1f572 100644 --- a/rustfs/Cargo.toml +++ b/rustfs/Cargo.toml @@ -291,6 +291,7 @@ tokio-rustls = { workspace = true, default-features = false, features = ["loggin aws-smithy-runtime-api = { workspace = true, features = ["http-1x"] } aws-smithy-types = { workspace = true } google-cloud-auth = { workspace = true, optional = true } +faster-hex = { workspace = true } moka = { workspace = true, features = ["sync"] } xxhash-rust = { workspace = true, features = ["xxh3"] } aws-sdk-s3 = { workspace = true, default-features = false, features = ["sigv4a", "default-https-client", "rt-tokio"] } diff --git a/rustfs/src/on_demand_migration/backfill.rs b/rustfs/src/on_demand_migration/backfill.rs index 8cc384ec8..78eeec9d0 100644 --- a/rustfs/src/on_demand_migration/backfill.rs +++ b/rustfs/src/on_demand_migration/backfill.rs @@ -470,10 +470,10 @@ impl BackfillContext for BucketBackfillContext { } async fn config_updated_at(&self) -> Result, StorageError> { - Ok( - super::config::decode_stored_config(get_on_demand_migration_config_in(&self.api.ctx, self.state.bucket()).await?)? - .map(|(_, updated_at)| updated_at), - ) + Ok(super::config::decode_stored_config( + get_on_demand_migration_config_in(self.api.instance_ctx(), self.state.bucket()).await?, + )? + .map(|(_, updated_at)| updated_at)) } } @@ -1472,7 +1472,7 @@ impl Job { /// Spawns [`run_backfill_recovery_loop`] on the store's shutdown token; /// `false` (nothing spawned) when the store has no background token. pub fn spawn_backfill_recovery_loop(runner: Arc) -> bool { - let Some(cancel) = runner.api.ctx.background_cancel_token() else { + let Some(cancel) = runner.api.instance_ctx().background_cancel_token() else { return false; }; tokio::spawn(run_backfill_recovery_loop(runner, cancel));