mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 13:16:28 +00:00
fix(storage): harden offline drive fail-fast paths (#2564)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
This commit is contained in:
@@ -68,6 +68,9 @@ pub enum Error {
|
||||
#[error("Invalid heal type: {heal_type}")]
|
||||
InvalidHealType { heal_type: String },
|
||||
|
||||
#[error("Transient heal skip: {message}")]
|
||||
TransientSkip { message: String },
|
||||
|
||||
#[error("Heal task cancelled")]
|
||||
TaskCancelled,
|
||||
|
||||
@@ -92,6 +95,11 @@ impl Error {
|
||||
{
|
||||
Error::Other(error.into().to_string())
|
||||
}
|
||||
|
||||
/// Create a transient skip error for retryable background heal checks.
|
||||
pub fn transient_skip(message: impl Into<String>) -> Self {
|
||||
Error::TransientSkip { message: message.into() }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for std::io::Error {
|
||||
|
||||
Reference in New Issue
Block a user