diff options
| author | Chris Lu <chris.lu@gmail.com> | 2014-03-20 13:30:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2014-03-20 13:30:34 -0700 |
| commit | 7251e357e70888539f3e3b3922004356d2d605da (patch) | |
| tree | 6b10042b96377f50c50aaa0a0e5f44cc9fa05de4 /go/replication | |
| parent | 7c5c94785c5789a333987348c3a3e462c143e885 (diff) | |
| download | seaweedfs-7251e357e70888539f3e3b3922004356d2d605da.tar.xz seaweedfs-7251e357e70888539f3e3b3922004356d2d605da.zip | |
enhance deletion operation
Diffstat (limited to 'go/replication')
| -rw-r--r-- | go/replication/store_replicate.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/go/replication/store_replicate.go b/go/replication/store_replicate.go index 3e709de44..249e7e3e6 100644 --- a/go/replication/store_replicate.go +++ b/go/replication/store_replicate.go @@ -5,6 +5,7 @@ import ( "code.google.com/p/weed-fs/go/glog" "code.google.com/p/weed-fs/go/operation" "code.google.com/p/weed-fs/go/storage" + "code.google.com/p/weed-fs/go/util" "net/http" "strconv" ) @@ -39,7 +40,7 @@ func ReplicatedWrite(masterNode string, s *storage.Store, volumeId storage.Volum volumeId.String() + ": " + err.Error() } else { distributedOperation(masterNode, s, volumeId, func(location operation.Location) bool { - return nil == operation.Delete("http://"+location.Url+r.URL.Path+"?type=replicate") + return nil == util.Delete("http://"+location.Url+r.URL.Path+"?type=replicate") }) } } @@ -61,7 +62,7 @@ func ReplicatedDelete(masterNode string, store *storage.Store, volumeId storage. if needToReplicate { //send to other replica locations if r.FormValue("type") != "replicate" { if !distributedOperation(masterNode, store, volumeId, func(location operation.Location) bool { - return nil == operation.Delete("http://"+location.Url+r.URL.Path+"?type=replicate") + return nil == util.Delete("http://"+location.Url+r.URL.Path+"?type=replicate") }) { ret = 0 } |
