From d056c0ddf2b7e34a5c7e8fdfe829e5c74e65a068 Mon Sep 17 00:00:00 2001 From: Max Denushev Date: Wed, 25 Sep 2024 02:15:54 +0300 Subject: fix(volume): don't persist RO state in specific cases (#6058) * fix(volume): don't persist RO state in specific cases * fix(volume): writable always persist --- weed/shell/command_volume_tier_upload.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'weed/shell/command_volume_tier_upload.go') diff --git a/weed/shell/command_volume_tier_upload.go b/weed/shell/command_volume_tier_upload.go index cb805b0cf..d30e3f8e5 100644 --- a/weed/shell/command_volume_tier_upload.go +++ b/weed/shell/command_volume_tier_upload.go @@ -4,10 +4,11 @@ import ( "context" "flag" "fmt" - "github.com/seaweedfs/seaweedfs/weed/pb" "io" "time" + "github.com/seaweedfs/seaweedfs/weed/pb" + "google.golang.org/grpc" "github.com/seaweedfs/seaweedfs/weed/operation" @@ -102,7 +103,7 @@ func doVolumeTierUpload(commandEnv *CommandEnv, writer io.Writer, collection str return fmt.Errorf("volume %d not found", vid) } - err = markVolumeReplicasWritable(commandEnv.option.GrpcDialOption, vid, existingLocations, false) + err = markVolumeReplicasWritable(commandEnv.option.GrpcDialOption, vid, existingLocations, false, false) if err != nil { return fmt.Errorf("mark volume %d as readonly on %s: %v", vid, existingLocations[0].Url, err) } -- cgit v1.2.3