fix(heal): report partial rename failures (#5355)

* fix(heal): report partial rename failures

* fix(log-analyzer): track partial heal rename failures
This commit is contained in:
cxymds
2026-07-28 17:37:02 +08:00
committed by GitHub
parent a3f5a8eaf9
commit d7afa4e38e
4 changed files with 282 additions and 13 deletions
+20
View File
@@ -144,6 +144,7 @@ fn is_recoverable_heal_error_message(error: &str) -> bool {
"connection refused",
"operation canceled",
"quorum not reached",
"heal rename incomplete",
]
.iter()
.any(|pattern| error.contains(pattern))
@@ -154,3 +155,22 @@ impl From<Error> for std::io::Error {
std::io::Error::other(err)
}
}
#[cfg(test)]
mod tests {
use super::Error;
use crate::heal::EcstoreError;
#[test]
fn incomplete_target_rename_is_recoverable() {
let task_error = Error::TaskExecutionFailed {
message: "heal rename incomplete: 1 of 2 targets committed".to_string(),
};
let storage_error = Error::Storage(EcstoreError::Io(std::io::Error::other(
"heal rename incomplete: 1 of 2 targets committed",
)));
assert!(task_error.is_recoverable_heal());
assert!(storage_error.is_recoverable_heal());
}
}