aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/volume_growth.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-09-07 11:54:12 -0700
committerchrislu <chris.lu@gmail.com>2024-09-07 11:54:22 -0700
commitaccba3070a4a82756835e00696cea0da9c7ff596 (patch)
tree082129d7a5ddfe186b73affe946ce25cdf48d565 /weed/topology/volume_growth.go
parentd6b0e0ff1c3807edcf82ee95129cb55a5e7fd915 (diff)
downloadseaweedfs-accba3070a4a82756835e00696cea0da9c7ff596.tar.xz
seaweedfs-accba3070a4a82756835e00696cea0da9c7ff596.zip
refactor
Diffstat (limited to 'weed/topology/volume_growth.go')
-rw-r--r--weed/topology/volume_growth.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go
index 70f0d9cd4..44462aa87 100644
--- a/weed/topology/volume_growth.go
+++ b/weed/topology/volume_growth.go
@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
"math/rand/v2"
+ "reflect"
"sync"
"time"
@@ -29,6 +30,11 @@ type VolumeGrowRequest struct {
Option *VolumeGrowOption
Count uint32
Force bool
+ Reason string
+}
+
+func (vg *VolumeGrowRequest) Equals(req *VolumeGrowRequest) bool {
+ return reflect.DeepEqual(existingReq.Option, req.Option) && vg.Count == req.Count
}
type volumeGrowthStrategy struct {