fix(restore): queue the heal of a partial commit under the normalized ID

A native restore commit that reaches a write quorum but not every drive
queues an MRF heal of the version. It passed the raw version ID, which is
empty for the null version, while the convergence path passes the
normalized "null". The heal boundary already reads an empty ID as the
null version, so the old entry healed the right version; this makes the
two paths queue the same identity.

The header of restore-capability.go still described the multipart upload
of the first native-restore design. It now describes what the capability
gate protects in the two-phase design: restore ownership through the
restore lock and the attempt marker, the staged commit under the object
lock, and the attempt fence. It also says why an unreachable server
blocks native restore: it is not proven stopped.

Test: TestRestorePartialCommitQueuesNullVersionHeal fails one drive's
commit on a noncurrent null version, checks the queued entry names
"null", and heals it back onto that drive. It fails on the base at the
identity check only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-11-06 19:40:24 +08:00
parent 94d91703b5
commit 3268fbea7e
3 changed files with 76 additions and 7 deletions
+14 -6
View File
@@ -28,12 +28,20 @@ import (
"github.com/minio/minio/internal/grid"
)
// A native restore keeps its multipart upload private and marks the version
// it rehydrates (restore-attempt.go). A server that predates this ignores
// the marker: it would list, change, abort or complete the upload. Native
// restore therefore runs only while every server of the cluster positively
// reports that it understands the marker. A server that does not answer,
// or does not know the question, as an older server does not, blocks it.
// Native restore is a protocol among the servers of a cluster
// (restore-stage.go): the restore lock of a version and the attempt that its
// ongoing marker names (restore-attempt.go) say which worker owns the
// restore, the copy is staged in the tmp volume and published under the
// object lock by a commit that checks the attempt again, and a superseded
// attempt writes nothing. A server that predates this protocol does not
// follow it: it would run its own restore of the same version, under other
// locks or none, and write it in its own way.
//
// Native restore therefore runs only while every server of the cluster
// positively reports that it speaks this protocol. A server that does not
// answer, or does not know the question, as an older server does not,
// blocks it: a server that is not reachable now is not proven stopped, and
// it may still be running an older restore.
// nativeRestoreCapability is the native restore protocol this server speaks.
const nativeRestoreCapability = "2"