aboutsummaryrefslogtreecommitdiff
path: root/weed/topology
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-09-07 12:38:34 -0700
committerchrislu <chris.lu@gmail.com>2024-09-07 12:38:34 -0700
commitff3d46637d7adaf364f6384c3d631d16c9741363 (patch)
treea64584b28b0f1b8c465d75f38ab146df16cb98b2 /weed/topology
parentaccba3070a4a82756835e00696cea0da9c7ff596 (diff)
downloadseaweedfs-ff3d46637d7adaf364f6384c3d631d16c9741363.tar.xz
seaweedfs-ff3d46637d7adaf364f6384c3d631d16c9741363.zip
better logging for volume growth
Diffstat (limited to 'weed/topology')
-rw-r--r--weed/topology/volume_growth.go2
-rw-r--r--weed/topology/volume_layout.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go
index 44462aa87..d856bbc22 100644
--- a/weed/topology/volume_growth.go
+++ b/weed/topology/volume_growth.go
@@ -34,7 +34,7 @@ type VolumeGrowRequest struct {
}
func (vg *VolumeGrowRequest) Equals(req *VolumeGrowRequest) bool {
- return reflect.DeepEqual(existingReq.Option, req.Option) && vg.Count == req.Count
+ return reflect.DeepEqual(vg.Option, req.Option) && vg.Count == req.Count && vg.Force == req.Force
}
type volumeGrowthStrategy struct {
diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go
index baa9b91d4..0951da60e 100644
--- a/weed/topology/volume_layout.go
+++ b/weed/topology/volume_layout.go
@@ -301,7 +301,7 @@ func (vl *VolumeLayout) PickForWrite(count uint64, option *VolumeGrowOption) (vi
lenWriters := len(vl.writables)
if lenWriters <= 0 {
- return 0, 0, nil, true, fmt.Errorf("%s in volume layout", noWritableVolumes)
+ return 0, 0, nil, true, fmt.Errorf("%s", noWritableVolumes)
}
if option.DataCenter == "" && option.Rack == "" && option.DataNode == "" {
vid := vl.writables[rand.Intn(lenWriters)]