aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/topology.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2019-10-29 19:43:56 -0700
committerGitHub <noreply@github.com>2019-10-29 19:43:56 -0700
commitd4f755347e4874cf0a2fd13480580f348b86a465 (patch)
tree100be0c642c7863baac2d7bae4c84fda62960925 /weed/topology/topology.go
parenteb2172f63fcdf7f5455c142daaceb6b1a489f7f4 (diff)
parentc2884cace2fae44dd97d718db30a22ab70151d63 (diff)
downloadseaweedfs-d4f755347e4874cf0a2fd13480580f348b86a465.tar.xz
seaweedfs-d4f755347e4874cf0a2fd13480580f348b86a465.zip
Merge pull request #1097 from iliul/misc-updated
misc updated
Diffstat (limited to 'weed/topology/topology.go')
-rw-r--r--weed/topology/topology.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/topology/topology.go b/weed/topology/topology.go
index eff8c99a0..ea0769248 100644
--- a/weed/topology/topology.go
+++ b/weed/topology/topology.go
@@ -120,10 +120,10 @@ func (t *Topology) HasWritableVolume(option *VolumeGrowOption) bool {
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 {
- return "", 0, nil, fmt.Errorf("failed to find writable volumes for collectio:%s replication:%s ttl:%s error: %v", option.Collection, option.ReplicaPlacement.String(), option.Ttl.String(), err)
+ return "", 0, nil, fmt.Errorf("failed to find writable volumes for collection:%s replication:%s ttl:%s error: %v", option.Collection, option.ReplicaPlacement.String(), option.Ttl.String(), err)
}
if datanodes.Length() == 0 {
- return "", 0, nil, fmt.Errorf("no writable volumes available for for collectio:%s replication:%s ttl:%s", option.Collection, option.ReplicaPlacement.String(), option.Ttl.String())
+ return "", 0, nil, fmt.Errorf("no writable volumes available for collection:%s replication:%s ttl:%s", option.Collection, option.ReplicaPlacement.String(), option.Ttl.String())
}
fileId, count := t.Sequence.NextFileId(count)
return needle.NewFileId(*vid, fileId, rand.Uint32()).String(), count, datanodes.Head(), nil