diff options
Diffstat (limited to 'go/replication')
| -rw-r--r-- | go/replication/store_replicate.go | 4 | ||||
| -rw-r--r-- | go/replication/volume_growth.go | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/go/replication/store_replicate.go b/go/replication/store_replicate.go index de2f3fcd8..bc630c5d1 100644 --- a/go/replication/store_replicate.go +++ b/go/replication/store_replicate.go @@ -2,9 +2,9 @@ package replication import ( "bytes" + "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/glog" "net/http" "strconv" ) @@ -25,7 +25,7 @@ func ReplicatedWrite(masterNode string, s *storage.Store, volumeId storage.Volum if needToReplicate { //send to other replica locations if r.FormValue("type") != "replicate" { if !distributedOperation(masterNode, s, volumeId, func(location operation.Location) bool { - _, err := operation.Upload("http://"+location.Url+r.URL.Path+"?type=replicate&ts="+strconv.FormatUint(needle.LastModified,10), string(needle.Name), bytes.NewReader(needle.Data), needle.IsGzipped(), string(needle.Mime)) + _, err := operation.Upload("http://"+location.Url+r.URL.Path+"?type=replicate&ts="+strconv.FormatUint(needle.LastModified, 10), string(needle.Name), bytes.NewReader(needle.Data), needle.IsGzipped(), string(needle.Mime)) return err == nil }) { ret = 0 diff --git a/go/replication/volume_growth.go b/go/replication/volume_growth.go index 18295498e..2adf72dee 100644 --- a/go/replication/volume_growth.go +++ b/go/replication/volume_growth.go @@ -1,12 +1,12 @@ package replication 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/topology" "errors" "fmt" - "code.google.com/p/weed-fs/go/glog" "math/rand" "sync" ) @@ -39,13 +39,13 @@ func (vg *VolumeGrowth) AutomaticGrowByType(repType storage.ReplicationType, dat factor = 1 count, err = vg.GrowByCountAndType(vg.copy1factor, repType, dataCenter, topo) case storage.Copy001: - factor = 2 + factor = 2 count, err = vg.GrowByCountAndType(vg.copy2factor, repType, dataCenter, topo) case storage.Copy010: - factor = 2 + factor = 2 count, err = vg.GrowByCountAndType(vg.copy2factor, repType, dataCenter, topo) case storage.Copy100: - factor = 2 + factor = 2 count, err = vg.GrowByCountAndType(vg.copy2factor, repType, dataCenter, topo) case storage.Copy110: factor = 3 |
