mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-05 19:55:37 +00:00
fix(site-replication): run both make-bucket broadcast steps on every peer (backlog#2293)
With the generic broadcast now attempting every peer and returning the first failure, stopping after the make step on that error skipped configure-replication for the peers whose make had just succeeded, and no retry event covered the gap. Run both steps and combine the results. (cherry picked from commit cf5c0476dc4265b6214bf34c47a9ae4c61bf8e3e)
This commit is contained in:
@@ -708,7 +708,12 @@ pub(crate) async fn broadcast_site_replication_make_bucket(
|
||||
} else {
|
||||
path
|
||||
};
|
||||
broadcast_site_replication_json_using_runtime(runtime, &path, &serde_json::json!({})).await?;
|
||||
// Both steps run to completion on their own: the broadcast attempts every
|
||||
// peer and reports the first failure (backlog#2293), so stopping here on
|
||||
// that error would skip `configure-replication` for the peers whose
|
||||
// `make` just succeeded — and nothing records a retry for that gap. The
|
||||
// failed peer's retry events cover both steps independently.
|
||||
let make_result = broadcast_site_replication_json_using_runtime(runtime, &path, &serde_json::json!({})).await;
|
||||
|
||||
let configure_path = bootstrap_bucket_op_path(bucket, "configure-replication");
|
||||
let configure_path = if let Some(token) = bootstrap_token {
|
||||
@@ -716,7 +721,8 @@ pub(crate) async fn broadcast_site_replication_make_bucket(
|
||||
} else {
|
||||
configure_path
|
||||
};
|
||||
broadcast_site_replication_json_using_runtime(runtime, &configure_path, &serde_json::json!({})).await
|
||||
let configure_result = broadcast_site_replication_json_using_runtime(runtime, &configure_path, &serde_json::json!({})).await;
|
||||
make_result.and(configure_result)
|
||||
}
|
||||
|
||||
const SITE_REPLICATION_DELETE_INTENT_PENDING: &str =
|
||||
|
||||
Reference in New Issue
Block a user