mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-20 11:32:19 +00:00
fix(ecstore): surface multipart cleanup delete errors (#4198)
This commit is contained in:
@@ -1658,6 +1658,9 @@ async fn cleanup_stale_multipart_uploads_in_set(set: &Arc<SetDisks>, now: Offset
|
|||||||
let mut deleted = 0usize;
|
let mut deleted = 0usize;
|
||||||
let mut candidates = HashMap::new();
|
let mut candidates = HashMap::new();
|
||||||
|
|
||||||
|
// Discovery is intentionally local-owner based: each server lists the disks
|
||||||
|
// it owns locally. Once a stale upload path is found, delete_all fans out
|
||||||
|
// idempotently across the set to remove matching shards on every disk.
|
||||||
for disk in set.get_local_disks().await.into_iter().flatten() {
|
for disk in set.get_local_disks().await.into_iter().flatten() {
|
||||||
if !disk.is_online().await {
|
if !disk.is_online().await {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -54,6 +54,18 @@ impl SetDisks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let failed = errors.iter().filter(|err| err.is_some()).count();
|
||||||
|
if failed > 0 {
|
||||||
|
debug!(
|
||||||
|
bucket = %bucket,
|
||||||
|
prefix = %prefix,
|
||||||
|
failed,
|
||||||
|
total = errors.len(),
|
||||||
|
errors = ?errors,
|
||||||
|
"delete_all completed with disk errors"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user