Merge pull request #233 from hxiaodon/master

Update store_replicate.go
This commit is contained in:
Chris Lu 2015-12-30 22:44:05 -08:00
commit 963c36338a

View file

@ -95,6 +95,13 @@ func distributedOperation(masterNode string, store *storage.Store, volumeId stor
for i := 0; i < length; i++ { for i := 0; i < length; i++ {
ret = ret && <-results 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 return ret
} else { } else {
glog.V(0).Infoln("Failed to lookup for", volumeId, lookupErr.Error()) glog.V(0).Infoln("Failed to lookup for", volumeId, lookupErr.Error())