mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-28 16:07:05 +00:00
2b61990ec6
refactor(heal): classify recoverability typed-first with documented needle fallback Backlog#1845 step 6. Heal's retry decision leaned on substring matching of rendered messages; the typed information available in the error values now takes priority: - Lock failures classify by LockError's own taxonomy instead of the blanket Lock(_) => recoverable: fatal variants (ResourceNotFound / PermissionDenied / Configuration) are terminal since retrying cannot fix them, while contention and transport variants (Timeout, Network, Internal, AlreadyLocked, QuorumNotReached, InsufficientNodes, ...) stay recoverable exactly as before. - DiskError::RemoteClientUnavailable and its StorageError twin (typed in #6619) join the typed recoverable lists, so client-acquisition failures no longer depend on which needle happens to appear in the detail. - task.rs is_transient_lock_or_timeout_error consults LockError::is_retryable / QuorumNotReached and the typed Timeout variants before falling back to needles. - The substring list is demoted to a documented fallback: every needle now carries a producer census comment naming what emits it, with the shrink-only rule stated (delete the needle when its producer becomes typed end-to-end). heal rename incomplete remains the one needle with no typed producer. heal gains a direct rustfs-lock dependency (already transitive via ecstore) to name LockError variants. New tests pin each typed source: contention/transport lock variants recoverable, fatal lock variants terminal, RemoteClientUnavailable recoverable with a detail that avoids every needle. All existing recoverability tests stay green. Ref rustfs/backlog#1845
109 lines
3.4 KiB
TOML
109 lines
3.4 KiB
TOML
# Copyright 2024 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
[package]
|
|
name = "rustfs-heal"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
authors = ["RustFS Team"]
|
|
license.workspace = true
|
|
description = "RustFS erasure set and object healing"
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
homepage.workspace = true
|
|
documentation = "https://docs.rs/rustfs-heal/latest/rustfs_heal/"
|
|
keywords = ["RustFS", "heal", "erasure-coding", "Minio"]
|
|
categories = ["web-programming", "development-tools", "filesystem"]
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = []
|
|
hotpath = [
|
|
"hotpath/hotpath",
|
|
"hotpath/tokio",
|
|
"hotpath/futures",
|
|
"rustfs-common/hotpath",
|
|
"rustfs-concurrency/hotpath",
|
|
"rustfs-config/hotpath",
|
|
"rustfs-ecstore/hotpath",
|
|
"rustfs-madmin/hotpath",
|
|
"rustfs-storage-api/hotpath",
|
|
"rustfs-utils/hotpath",
|
|
"rustfs-test-utils/hotpath",
|
|
]
|
|
hotpath-alloc = [
|
|
"hotpath",
|
|
"hotpath/hotpath-alloc",
|
|
"rustfs-common/hotpath-alloc",
|
|
"rustfs-concurrency/hotpath-alloc",
|
|
"rustfs-config/hotpath-alloc",
|
|
"rustfs-ecstore/hotpath-alloc",
|
|
"rustfs-madmin/hotpath-alloc",
|
|
"rustfs-storage-api/hotpath-alloc",
|
|
"rustfs-utils/hotpath-alloc",
|
|
"rustfs-test-utils/hotpath-alloc",
|
|
]
|
|
hotpath-cpu = [
|
|
"hotpath",
|
|
"hotpath/hotpath-cpu",
|
|
"rustfs-common/hotpath-cpu",
|
|
"rustfs-concurrency/hotpath-cpu",
|
|
"rustfs-config/hotpath-cpu",
|
|
"rustfs-ecstore/hotpath-cpu",
|
|
"rustfs-madmin/hotpath-cpu",
|
|
"rustfs-storage-api/hotpath-cpu",
|
|
"rustfs-utils/hotpath-cpu",
|
|
"rustfs-test-utils/hotpath-cpu",
|
|
]
|
|
|
|
[dependencies]
|
|
hotpath.workspace = true
|
|
rustfs-config = { workspace = true }
|
|
rustfs-concurrency = { workspace = true }
|
|
rustfs-ecstore = { workspace = true }
|
|
rustfs-lock = { workspace = true }
|
|
rustfs-storage-api = { workspace = true }
|
|
rustfs-common = { workspace = true }
|
|
rustfs-madmin = { workspace = true }
|
|
rustfs-utils = { workspace = true }
|
|
tokio = { workspace = true, features = ["sync", "io-util", "time", "macros", "fs", "rt-multi-thread"] }
|
|
tokio-util = { workspace = true, features = ["io", "compat"] }
|
|
tracing = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true, features = ["raw_value"] }
|
|
thiserror = { workspace = true }
|
|
uuid = { workspace = true, features = ["v4", "serde", "fast-rng", "macro-diagnostics"] }
|
|
async-trait = { workspace = true }
|
|
futures = { workspace = true }
|
|
metrics = { workspace = true }
|
|
base64 = { workspace = true }
|
|
bytes = { workspace = true }
|
|
crc-fast = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
serde_json = { workspace = true, features = ["raw_value"] }
|
|
rustfs-test-utils = { workspace = true }
|
|
serial_test = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
walkdir = { workspace = true }
|
|
http = { workspace = true }
|
|
temp-env = { workspace = true, features = ["async_closure"] }
|
|
tokio = { workspace = true, features = ["test-util", "fs", "rt-multi-thread"] }
|
|
|
|
[lib]
|
|
doctest = false
|