aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/topology.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2024-11-26 21:33:31 +0500
committerGitHub <noreply@github.com>2024-11-26 08:33:31 -0800
commite2e97db917641769b5ddf6c311c406ec63463a10 (patch)
treec1f89cb0c8d773cc483073e31d617728c73b0172 /weed/topology/topology.go
parentfec88e64eb7c33e73b2e6da2afa99d68db56e495 (diff)
downloadseaweedfs-e2e97db917641769b5ddf6c311c406ec63463a10.tar.xz
seaweedfs-e2e97db917641769b5ddf6c311c406ec63463a10.zip
[master] avoid timeout when assigning for main request with filter by DC or rack (#6291)
* avoid timeout when assigning for main request with filter by DC or rack https://github.com/seaweedfs/seaweedfs/issues/6290 * use constant NoWritableVolumes
Diffstat (limited to 'weed/topology/topology.go')
-rw-r--r--weed/topology/topology.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/topology/topology.go b/weed/topology/topology.go
index be50eecdf..8e55d33a9 100644
--- a/weed/topology/topology.go
+++ b/weed/topology/topology.go
@@ -254,7 +254,7 @@ func (t *Topology) PickForWrite(requestedCount uint64, option *VolumeGrowOption,
return "", 0, nil, shouldGrow, 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 volumeLocationList == nil || volumeLocationList.Length() == 0 {
- return "", 0, nil, shouldGrow, fmt.Errorf("%s available for collection:%s replication:%s ttl:%s", noWritableVolumes, option.Collection, option.ReplicaPlacement.String(), option.Ttl.String())
+ return "", 0, nil, shouldGrow, fmt.Errorf("%s available for collection:%s replication:%s ttl:%s", NoWritableVolumes, option.Collection, option.ReplicaPlacement.String(), option.Ttl.String())
}
nextFileId := t.Sequence.NextFileId(requestedCount)
fileId = needle.NewFileId(vid, nextFileId, rand.Uint32()).String()