fix(heal): repair all object versions during disk-replacement heal (#4400)

Disk-replacement heal previously repaired only the latest version of each
object and never enumerated objects whose latest version is a delete marker,
so old versions were left unrepaired on a replaced drive.

Switch heal enumeration from list_objects_v2 (latest-only) to
list_object_versions (every version incl. delete markers), thread the concrete
version_id into the existing per-version heal_object, and make resume
cursor-based instead of positional: an opaque (marker, version_marker) paging
token persisted in ResumeState, a length-prefixed injective per-version dedup
key, schema_version bumps (v2) migrated independently in each of the two
persisted files, and a retry that resets both managers together (fixing a
latent rescan-skips-everything defect). Adds a real-disk-wipe e2e regression
suite proving old versions and delete-marker-latest objects are physically
restored.

Fixes rustfs/backlog#918
Fixes rustfs/backlog#919
Closes rustfs/backlog#854
This commit is contained in:
Zhengchao An
2026-07-08 08:58:52 +08:00
committed by GitHub
parent 4715dbed01
commit 2b063b0c4a
11 changed files with 1831 additions and 488 deletions
Generated
+1
View File
@@ -9261,6 +9261,7 @@ name = "rustfs-heal"
version = "1.0.0-beta.8"
dependencies = [
"async-trait",
"base64 0.22.1",
"futures",
"http 1.4.2",
"metrics",