aboutsummaryrefslogtreecommitdiff
path: root/go/topology/topology.go
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2015-04-06 14:17:36 -0700
committerchrislusf <chris.lu@gmail.com>2015-04-06 14:17:36 -0700
commit3ece066700169013497390aaca8d1d86bf7ecb2d (patch)
tree4e412ced584332cd3d8e4281d55c65916795cf21 /go/topology/topology.go
parentc37a20178e76661acacbf4e84da0a916d9129cbc (diff)
downloadseaweedfs-3ece066700169013497390aaca8d1d86bf7ecb2d.tar.xz
seaweedfs-3ece066700169013497390aaca8d1d86bf7ecb2d.zip
change count to uint64 to fix #109
fix https://github.com/chrislusf/weed-fs/issues/109
Diffstat (limited to 'go/topology/topology.go')
-rw-r--r--go/topology/topology.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/go/topology/topology.go b/go/topology/topology.go
index d96847ed2..f12261081 100644
--- a/go/topology/topology.go
+++ b/go/topology/topology.go
@@ -115,7 +115,7 @@ func (t *Topology) HasWritableVolume(option *VolumeGrowOption) bool {
return vl.GetActiveVolumeCount(option) > 0
}
-func (t *Topology) PickForWrite(count int, option *VolumeGrowOption) (string, int, *DataNode, error) {
+func (t *Topology) PickForWrite(count uint64, option *VolumeGrowOption) (string, uint64, *DataNode, error) {
vid, count, datanodes, err := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl).PickForWrite(count, option)
if err != nil || datanodes.Length() == 0 {
return "", 0, nil, errors.New("No writable volumes available!")