fix(replication): restrict metadata replication targets (#5696)

This commit is contained in:
Zhengchao An
2026-08-04 22:46:42 +08:00
committed by GitHub
parent d401c65719
commit c26419e357
3 changed files with 45 additions and 3 deletions
@@ -566,7 +566,7 @@ pub(crate) async fn must_replicate(bucket: &str, object: &str, mopts: MustReplic
let mut sopts = opts.clone();
sopts.target_arn = arn.clone();
let replicate = cfg.replicate(&sopts);
let replicate = cfg.replicate(&sopts) && mopts.metadata_target_is_eligible(&arn);
let synchronous = if let Some(cli) = cli { cli.replicate_sync } else { false };
dsc.set(ReplicateTargetDecision::new(arn, replicate, synchronous));