mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Update store_replicate.go
replication operations should be equal to volume's replication setting
This commit is contained in:
parent
4d56039ad4
commit
4e48f64512
|
@ -95,6 +95,13 @@ func distributedOperation(masterNode string, store *storage.Store, volumeId stor
|
|||
for i := 0; i < length; i++ {
|
||||
ret = ret && <-results
|
||||
}
|
||||
if volume := store.GetVolume(volumeId); volume != nil {
|
||||
copyCount := volume.ReplicaPlacement.GetCopyCount() - 1
|
||||
if length < copyCount {
|
||||
glog.V(0).Infoln("replicating opetations [%d] is less than volume's replication copy count [%d]", length, copyCount)
|
||||
ret = false
|
||||
}
|
||||
}
|
||||
return ret
|
||||
} else {
|
||||
glog.V(0).Infoln("Failed to lookup for", volumeId, lookupErr.Error())
|
||||
|
|
Loading…
Reference in a new issue