Compare commits

...

1 Commits

Author SHA1 Message Date
overtrue 4dd88becec fix(ecstore): remove duplicate rename_data definitions from merge conflict
PR #7166 (refactor to isolate local object rename commit) extracted
rename_data_inner, rename_data_observed, and LocalRenamePreflightRejection
into disk/local/commit.rs. PR #7163 (drain control writes) was based on
code before the refactor and re-added the same definitions to local.rs,
causing 27 compilation errors (duplicate struct/method definitions and
unresolved helper symbols).

Remove the duplicate block (997 lines) from local.rs; the canonical
definitions in commit.rs are already imported via the module re-export.

Also fix 4 clippy warnings introduced by upstream:
- shared.rs: redundant guard pattern → direct pattern match
- tests.rs: needless struct update, needless borrow, cloned_ref_to_slice_refs
2026-09-05 20:02:17 +08:00
3 changed files with 3 additions and 1001 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -309,7 +309,7 @@ fn classify_bucket_default_sse_lookup(
) -> S3Result<Option<(ServerSideEncryptionConfiguration, OffsetDateTime)>> { ) -> S3Result<Option<(ServerSideEncryptionConfiguration, OffsetDateTime)>> {
match lookup { match lookup {
Ok(config) => Ok(Some(config)), Ok(config) => Ok(Some(config)),
Err(err) if err == StorageError::ConfigNotFound => Ok(None), Err(StorageError::ConfigNotFound) => Ok(None),
Err(err) => { Err(err) => {
let api_error = ApiError::from(err); let api_error = ApiError::from(err);
error!( error!(
+2 -3
View File
@@ -867,7 +867,6 @@ fn test_retry_drain_bounds_each_peer_round_to_one_small_request_chain() {
r#type: "tags".to_string(), r#type: "tags".to_string(),
..Default::default() ..Default::default()
}], }],
..Default::default()
}; };
let make = RetryDrainAction::BucketOpReplay { let make = RetryDrainAction::BucketOpReplay {
operation: SITE_REPLICATION_BUCKET_OP_MAKE_WITH_VERSIONING.to_string(), operation: SITE_REPLICATION_BUCKET_OP_MAKE_WITH_VERSIONING.to_string(),
@@ -973,7 +972,7 @@ fn test_lightweight_bucket_retry_plan_orders_real_metadata_and_counts_it() {
operator_replication.rules.push(operator_rule("operator-backup")); operator_replication.rules.push(operator_rule("operator-backup"));
let mut bucket_with_operator_rule = bucket; let mut bucket_with_operator_rule = bucket;
bucket_with_operator_rule.replication_config = bucket_with_operator_rule.replication_config =
Some(BASE64_STANDARD.encode_to_string(&serialize(&operator_replication).expect("operator replication config"))); Some(BASE64_STANDARD.encode_to_string(serialize(&operator_replication).expect("operator replication config")));
let plan = site_replication_bucket_retry_plan_from_info(&bucket_with_operator_rule, false).expect("targeted retry plan"); let plan = site_replication_bucket_retry_plan_from_info(&bucket_with_operator_rule, false).expect("targeted retry plan");
assert!( assert!(
plan.bucket_items.iter().any(|item| item.r#type == "replication-config"), plan.bucket_items.iter().any(|item| item.r#type == "replication-config"),
@@ -1050,7 +1049,7 @@ fn test_reachable_probe_promotion_is_fenced_by_the_observed_event() {
.peers .peers
.insert("remote".to_string(), peer("remote", "https://remote.example.com")); .insert("remote".to_string(), peer("remote", "https://remote.example.com"));
assert_eq!(mark_reachable_deferred_retry_events(&mut state, &[recovered.clone()]), 1); assert_eq!(mark_reachable_deferred_retry_events(&mut state, std::slice::from_ref(&recovered)), 1);
assert_eq!(state.retry_queue[0].updated_at, None); assert_eq!(state.retry_queue[0].updated_at, None);
assert!(!state.retry_queue[0].peer_unreachable); assert!(!state.retry_queue[0].peer_unreachable);
assert_eq!( assert_eq!(