aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_tier_move.go
diff options
context:
space:
mode:
authorMax Denushev <mdenushev@ya.ru>2024-09-25 02:15:54 +0300
committerGitHub <noreply@github.com>2024-09-24 16:15:54 -0700
commitd056c0ddf2b7e34a5c7e8fdfe829e5c74e65a068 (patch)
treefffe7a06af9a4dee525c40cdcf1db02f5190bddd /weed/shell/command_volume_tier_move.go
parentc96b2ce8e55e84fe46219886f15deb186653c39a (diff)
downloadseaweedfs-d056c0ddf2b7e34a5c7e8fdfe829e5c74e65a068.tar.xz
seaweedfs-d056c0ddf2b7e34a5c7e8fdfe829e5c74e65a068.zip
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
Diffstat (limited to 'weed/shell/command_volume_tier_move.go')
-rw-r--r--weed/shell/command_volume_tier_move.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_volume_tier_move.go b/weed/shell/command_volume_tier_move.go
index c6364757f..5aa07a7b7 100644
--- a/weed/shell/command_volume_tier_move.go
+++ b/weed/shell/command_volume_tier_move.go
@@ -234,14 +234,14 @@ func (c *commandVolumeTierMove) doMoveOneVolume(commandEnv *CommandEnv, writer i
}
// mark all replicas as read only
- if err = markVolumeReplicasWritable(commandEnv.option.GrpcDialOption, vid, locations, false); err != nil {
+ if err = markVolumeReplicasWritable(commandEnv.option.GrpcDialOption, vid, locations, false, false); err != nil {
return fmt.Errorf("mark volume %d as readonly on %s: %v", vid, locations[0].Url, err)
}
newAddress := pb.NewServerAddressFromDataNode(dst.dataNode)
if err = LiveMoveVolume(commandEnv.option.GrpcDialOption, writer, vid, sourceVolumeServer, newAddress, 5*time.Second, toDiskType.ReadableString(), ioBytePerSecond, true); err != nil {
// mark all replicas as writable
- if err = markVolumeReplicasWritable(commandEnv.option.GrpcDialOption, vid, locations, true); err != nil {
+ if err = markVolumeReplicasWritable(commandEnv.option.GrpcDialOption, vid, locations, true, false); err != nil {
glog.Errorf("mark volume %d as writable on %s: %v", vid, locations[0].Url, err)
}