fix(replication): harden site-repl versioning sync (#3739)

This commit is contained in:
houseme
2026-06-22 19:18:42 +08:00
committed by GitHub
parent e57962d5e8
commit 64aef06c60
4 changed files with 108 additions and 3 deletions
@@ -16,6 +16,7 @@ use crate::common::{
RustFSTestEnvironment, awscurl_available, awscurl_post_sts_form_urlencoded, init_logging, local_http_client,
};
use aws_sdk_s3::config::{Credentials, Region};
use aws_sdk_s3::error::ProvideErrorMetadata;
use aws_sdk_s3::primitives::ByteStream;
use aws_sdk_s3::types::{BucketVersioningStatus, VersioningConfiguration};
use aws_sdk_s3::{Client, Config};
@@ -701,7 +702,7 @@ async fn wait_for_object_on_target(
return Ok(body);
}
Err(err) => {
if err.to_string().contains("NoSuchKey") || err.to_string().contains("NotFound") {
if matches!(err.code(), Some("NoSuchKey" | "NotFound" | "NoSuchVersion")) {
sleep(Duration::from_millis(250)).await;
continue;
}