Browse Source

avoid delete volume replica if collection mismatch

pull/3056/head
Konstantin Lebedev 3 years ago
parent
commit
279053572c
  1. 7
      weed/shell/command_volume_fix_replication.go

7
weed/shell/command_volume_fix_replication.go

@ -200,6 +200,13 @@ func (c *commandVolumeFixReplication) deleteOneVolume(commandEnv *CommandEnv, wr
}
}
for _, volumeReplica := range replicas {
if volumeReplica.info.Collection != replica.info.Collection {
fmt.Fprintf(writer, "skip delete volume %d as collection %s is mismatch: %s\n", replica.info.Id, replica.info.Collection, volumeReplica.info.Collection)
continue
}
}
fmt.Fprintf(writer, "deleting volume %d from %s ...\n", replica.info.Id, replica.location.dataNode.Id)
if !takeAction {

Loading…
Cancel
Save