mirror of
https://github.com/pgsty/minio.git
synced 2026-11-10 01:31:52 +03:00
fix(heal): send the dry-run flag to remote bucket heal
remotePeerS3Client.HealBucket sent only the bucket name and the remove flag, and HealBucketHandler built its heal options from those two values. During a dry-run bucket heal every remote node therefore ran a real one: it created the bucket directory on drives that lacked it, or removed empty bucket directories when the bucket was missing from every pool. Only the coordinating node honored DryRun. Add a "dry-run" key to the peer message and read it into HealOpts.DryRun on the receiving side, so healBucketLocal returns before MakeVol and DeleteVol on every node. The message is a string map: an older node ignores the key, and a missing key reads as false, so a mixed-version cluster behaves as before until every node is upgraded. The regression calls the real client over a test grid connection to the real handler. It fails on main, and it fails if either side of the change is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import (
|
||||
const (
|
||||
peerS3Bucket = "bucket"
|
||||
peerS3BucketDeleted = "bucket-deleted"
|
||||
peerS3BucketDryRun = "dry-run"
|
||||
peerS3BucketForceCreate = "force-create"
|
||||
peerS3BucketForceDelete = "force-delete"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user