aboutsummaryrefslogtreecommitdiff
path: root/go/topology
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2015-03-09 00:34:26 -0700
committerchrislusf <chris.lu@gmail.com>2015-03-09 01:10:04 -0700
commit853701cb6b13c0e56c0b9c242aa027003e32f6c2 (patch)
tree4e486ff9e330d63f5ec7839e2a918743dd3f9983 /go/topology
parent9d8a6d2562b20fe20028938f96397a0921a47a18 (diff)
downloadseaweedfs-853701cb6b13c0e56c0b9c242aa027003e32f6c2.tar.xz
seaweedfs-853701cb6b13c0e56c0b9c242aa027003e32f6c2.zip
Avoid wrong way to delete on replication failure
Avoid wrong way to delete on replication failure. This deletion has bug to write. The better fix is not to use the deletion on failure at all.
Diffstat (limited to 'go/topology')
-rw-r--r--go/topology/store_replicate.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/go/topology/store_replicate.go b/go/topology/store_replicate.go
index da426e587..c44877da1 100644
--- a/go/topology/store_replicate.go
+++ b/go/topology/store_replicate.go
@@ -45,16 +45,6 @@ func ReplicatedWrite(masterNode string, s *storage.Store,
}
}
}
- if errorStatus != "" {
- if _, err = s.Delete(volumeId, needle); err != nil {
- errorStatus += "\nCannot delete " + strconv.FormatUint(needle.Id, 10) + " from " +
- volumeId.String() + ": " + err.Error()
- } else {
- distributedOperation(masterNode, s, volumeId, func(location operation.Location) bool {
- return nil == util.Delete("http://"+location.Url+r.URL.Path+"?type=replicate", jwt)
- })
- }
- }
size = ret
return
}