mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 16:46:55 +00:00
fix: preserve scanner usage state (#4177)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user