diff options
| author | Chris Lu <chris.lu@uber.com> | 2021-04-14 10:26:26 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2021-04-14 10:26:26 -0700 |
| commit | 9d50867d08557acf389878c6f42bd22d0c2cc709 (patch) | |
| tree | 54a558b420e365f345f05bfc5549693865ccdec4 /weed/shell/command_volume_tier_move.go | |
| parent | ff4c1d59652953ea2d81ad317ba92f34ab5e3c0c (diff) | |
| download | seaweedfs-9d50867d08557acf389878c6f42bd22d0c2cc709.tar.xz seaweedfs-9d50867d08557acf389878c6f42bd22d0c2cc709.zip | |
volume.tier.move: avoid data loss when destination volume server already has the volume
fix https://github.com/chrislusf/seaweedfs/issues/2001
Diffstat (limited to 'weed/shell/command_volume_tier_move.go')
| -rw-r--r-- | weed/shell/command_volume_tier_move.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_volume_tier_move.go b/weed/shell/command_volume_tier_move.go index f7fa94031..d6a49d6e1 100644 --- a/weed/shell/command_volume_tier_move.go +++ b/weed/shell/command_volume_tier_move.go @@ -133,7 +133,7 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, collection strin // remove the remaining replicas for _, loc := range locations { - if loc.Url != sourceVolumeServer { + if loc.Url != dst.dataNode.Id { if err = deleteVolume(commandEnv.option.GrpcDialOption, vid, loc.Url); err != nil { fmt.Fprintf(writer, "failed to delete volume %d on %s\n", vid, loc.Url) } |
