diff options
| author | Max Denushev <mdenushev@ya.ru> | 2024-09-25 02:15:54 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-24 16:15:54 -0700 |
| commit | d056c0ddf2b7e34a5c7e8fdfe829e5c74e65a068 (patch) | |
| tree | fffe7a06af9a4dee525c40cdcf1db02f5190bddd /weed/shell/command_volume_tier_move.go | |
| parent | c96b2ce8e55e84fe46219886f15deb186653c39a (diff) | |
| download | seaweedfs-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.go | 4 |
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) } |
