Browse Source

fix: also reset hasMoved on moveMountedShardToEcNode error

Same issue as the previous fix: if moveMountedShardToEcNode fails
after some shards succeeded, hasMoved would incorrectly be true.
Ensure partial moves are always reported as failures.
pull/7621/head
chrislu 6 days ago
parent
commit
0817499e8a
  1. 1
      weed/shell/command_volume_server_evacuate.go

1
weed/shell/command_volume_server_evacuate.go

@ -225,6 +225,7 @@ func (c *commandVolumeServerEvacuate) moveAwayOneEcVolume(commandEnv *CommandEnv
}
err = moveMountedShardToEcNode(commandEnv, thisNode, ecShardInfo.Collection, vid, shardId, emptyNode, destDiskId, applyChange)
if err != nil {
hasMoved = false
return
} else {
hasMoved = true

Loading…
Cancel
Save