mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid delete volume replica if collection mismatch
This commit is contained in:
parent
9ff0d99002
commit
279053572c
|
@ -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)
|
fmt.Fprintf(writer, "deleting volume %d from %s ...\n", replica.info.Id, replica.location.dataNode.Id)
|
||||||
|
|
||||||
if !takeAction {
|
if !takeAction {
|
||||||
|
|
Loading…
Reference in a new issue