feat(ecstore): add on-demand migration bucket config model (#7061)

* feat(ecstore): add on-demand migration bucket config model

Introduce OnDemandMigrationConfig (deny_unknown_fields, version 1) with typed validation, credential redaction, a secret-free Debug impl, and the OnceLock publish hook the runtime registers into. Exported through the api facade.

* feat(ecstore): persist on-demand migration config in bucket metadata

Store the config as a RustFS extension entry (on-demand-migration.json) with its update time in .metadata.bin, add the typed BucketMetadataSys accessor, and publish the config through the hook on every cache-install path alongside the durability sync.

* test(e2e): rename stall timing variable flagged by typos

* test(storage): heap-pin the RestoreObject usecase future in the generation guard test
This commit is contained in:
Zhengchao An
2026-09-02 22:54:51 +08:00
committed by GitHub
parent 9e0663cbba
commit 1ab6405ac9
6 changed files with 1510 additions and 24 deletions
+9 -4
View File
@@ -4361,10 +4361,15 @@ mod tests {
apply_bucket_generation_guard(&req, &bucket, &mut opts).expect("apply the RestoreObject authorization guard");
assert_eq!(opts.expected_bucket_incarnation_id, Some(authorized_incarnation_id));
let err = crate::app::object_usecase::DefaultObjectUsecase::with_context(Some(app_context))
.execute_restore_object(req)
.await
.expect_err("the old RestoreObject authorization must not reach the recreated bucket");
// The RestoreObject usecase future is large enough that, inlined into
// this test body, the test thread's 2 MiB stack sits within a few KiB
// of overflowing on Linux; heap-pin it so unrelated growth in bucket
// metadata futures cannot tip the test over.
let err = Box::pin(
crate::app::object_usecase::DefaultObjectUsecase::with_context(Some(app_context)).execute_restore_object(req),
)
.await
.expect_err("the old RestoreObject authorization must not reach the recreated bucket");
assert_eq!(err.code(), &S3ErrorCode::NoSuchBucket);
store
.delete_bucket(&bucket, &DeleteBucketOptions::default())