fix: preserve scanner usage state (#4177)

This commit is contained in:
cxymds
2026-07-02 16:32:51 +08:00
committed by GitHub
parent 71e9e81257
commit d6a9826949
2 changed files with 111 additions and 11 deletions
+27 -1
View File
@@ -1570,7 +1570,33 @@ impl FolderScanner {
let candidate_type = pending_scanner_heal_candidate_type(kind);
let priority = request.priority;
let scan_mode = request.scan_mode.unwrap_or(self.scan_mode);
let result = send_scanner_heal_request(candidate_type, request).await?;
let result = match send_scanner_heal_request(candidate_type, request).await {
Ok(result) => result,
Err(err) => {
self.update_pending_scanner_heal_after_admission(
kind,
&bucket,
object.as_deref(),
version_id.as_deref(),
scan_mode,
HealAdmissionResult::Full,
);
error!(
target: "rustfs::scanner::folder",
event = EVENT_SCANNER_HEAL_ADMISSION,
component = LOG_COMPONENT_SCANNER,
subsystem = LOG_SUBSYSTEM_HEAL,
candidate_type,
bucket = %bucket,
object = object.as_deref().unwrap_or(""),
priority = heal_priority_label(priority),
state = "heal_channel_error",
error = %err,
"Scanner deferred heal request after channel error"
);
return Ok(());
}
};
self.update_pending_scanner_heal_after_admission(
kind,
&bucket,