aboutsummaryrefslogtreecommitdiff
path: root/go/replication
diff options
context:
space:
mode:
Diffstat (limited to 'go/replication')
-rw-r--r--go/replication/volume_growth.go6
-rw-r--r--go/replication/volume_growth_test.go9
2 files changed, 9 insertions, 6 deletions
diff --git a/go/replication/volume_growth.go b/go/replication/volume_growth.go
index 747e07642..1f266f73f 100644
--- a/go/replication/volume_growth.go
+++ b/go/replication/volume_growth.go
@@ -1,12 +1,12 @@
package replication
import (
- "errors"
- "fmt"
- "math/rand"
"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"
+ "math/rand"
"sync"
)
diff --git a/go/replication/volume_growth_test.go b/go/replication/volume_growth_test.go
index e35dbc707..3fbeebc9e 100644
--- a/go/replication/volume_growth_test.go
+++ b/go/replication/volume_growth_test.go
@@ -1,11 +1,11 @@
package replication
import (
+ "code.google.com/p/weed-fs/go/storage"
+ "code.google.com/p/weed-fs/go/topology"
"encoding/json"
"fmt"
"math/rand"
- "code.google.com/p/weed-fs/go/storage"
- "code.google.com/p/weed-fs/go/topology"
"testing"
"time"
)
@@ -96,7 +96,10 @@ func setup(topologyLayout string) *topology.Topology {
rack.LinkChildNode(server)
for _, v := range serverMap["volumes"].([]interface{}) {
m := v.(map[string]interface{})
- vi := storage.VolumeInfo{Id: storage.VolumeId(int64(m["id"].(float64))), Size: int64(m["size"].(float64)), Version: storage.CurrentVersion}
+ vi := storage.VolumeInfo{
+ Id: storage.VolumeId(int64(m["id"].(float64))),
+ Size: uint64(m["size"].(float64)),
+ Version: storage.CurrentVersion}
server.AddOrUpdateVolume(vi)
}
server.UpAdjustMaxVolumeCountDelta(int(serverMap["limit"].(float64)))