diff options
| author | Chris Lu <chris.lu@gmail.com> | 2015-12-30 22:44:05 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2015-12-30 22:44:05 -0800 |
| commit | 963c36338ab733210cc39ef1af553ccdee175ea6 (patch) | |
| tree | 9d87e036077ad930068980c72d7f1cc25a510ee7 /go | |
| parent | 4d56039ad4ee96db938af4df93bd4b0153c1400f (diff) | |
| parent | 4e48f64512d3f6fdbab17e777fff3fe191592a76 (diff) | |
| download | seaweedfs-963c36338ab733210cc39ef1af553ccdee175ea6.tar.xz seaweedfs-963c36338ab733210cc39ef1af553ccdee175ea6.zip | |
Merge pull request #233 from hxiaodon/master
Update store_replicate.go
Diffstat (limited to 'go')
| -rw-r--r-- | go/topology/store_replicate.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/go/topology/store_replicate.go b/go/topology/store_replicate.go index dc26dade0..4adb4431e 100644 --- a/go/topology/store_replicate.go +++ b/go/topology/store_replicate.go @@ -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()) |
