mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-22 20:36:38 +00:00
fix(heal): preserve terminal progress counters
This commit is contained in:
@@ -1180,7 +1180,7 @@ impl ErasureSetHealer {
|
||||
|
||||
telemetry_unknown |= !increment_counter(processed_objects);
|
||||
completed_in_page += 1;
|
||||
let progress_unknown = {
|
||||
let (progress_unknown, skipped_new_versions, skipped_ilm_expired) = {
|
||||
let mut progress = self.progress.write().await;
|
||||
progress.set_current_object(Some(format!("{bucket}/{object}")));
|
||||
progress.update_object_progress(
|
||||
@@ -1193,7 +1193,7 @@ impl ErasureSetHealer {
|
||||
if telemetry_unknown {
|
||||
progress.mark_unknown();
|
||||
}
|
||||
progress.counter_unknown
|
||||
(progress.counter_unknown, progress.skipped_new_versions, progress.skipped_ilm_expired)
|
||||
};
|
||||
checkpoint_manager
|
||||
.record_object_outcome(
|
||||
@@ -1203,8 +1203,8 @@ impl ErasureSetHealer {
|
||||
*failed_objects,
|
||||
*skipped_objects,
|
||||
bytes_processed,
|
||||
0,
|
||||
0,
|
||||
skipped_new_versions,
|
||||
skipped_ilm_expired,
|
||||
telemetry_unknown || progress_unknown,
|
||||
)
|
||||
.await?;
|
||||
|
||||
@@ -290,14 +290,12 @@ impl HealTask {
|
||||
self.check_control_flags().await?;
|
||||
let mut telemetry_unknown = false;
|
||||
let object = item.name.as_str();
|
||||
if retry_attempt == 0 {
|
||||
telemetry_unknown |= !increment_counter(&mut scanned);
|
||||
}
|
||||
{
|
||||
let mut progress = self.progress.write().await;
|
||||
progress.set_current_object(Some(format!("{bucket}/{object}")));
|
||||
}
|
||||
|
||||
let mut terminal_outcome = true;
|
||||
let error = match self
|
||||
.await_with_control(
|
||||
self.storage
|
||||
@@ -345,6 +343,7 @@ impl HealTask {
|
||||
"Heal bucket object repair skipped due to transient metadata error"
|
||||
);
|
||||
} else if err.is_recoverable_heal() && retry_attempt < MAX_BUCKET_OBJECT_HEAL_RETRIES {
|
||||
terminal_outcome = false;
|
||||
debug!(
|
||||
target: "rustfs::heal::task",
|
||||
event = EVENT_HEAL_BUCKET_RESULT,
|
||||
@@ -386,6 +385,14 @@ impl HealTask {
|
||||
}
|
||||
}
|
||||
|
||||
if terminal_outcome {
|
||||
telemetry_unknown |= !increment_counter(&mut scanned);
|
||||
}
|
||||
|
||||
if !terminal_outcome {
|
||||
continue;
|
||||
}
|
||||
|
||||
let mut progress = self.progress.write().await;
|
||||
progress.update_object_progress(scanned, healed, failed, skipped, bytes);
|
||||
if telemetry_unknown {
|
||||
|
||||
Reference in New Issue
Block a user