diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2024-11-21 21:19:19 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-21 08:19:19 -0800 |
| commit | 7fa4e5c2a113c96ce3dab5146f9f92b67f3cca36 (patch) | |
| tree | 30052b7acb60c51a4084c875b09945c462ed5981 | |
| parent | a143c888e53d007e7089c71f2c2af7c35b86a55e (diff) | |
| download | seaweedfs-7fa4e5c2a113c96ce3dab5146f9f92b67f3cca36.tar.xz seaweedfs-7fa4e5c2a113c96ce3dab5146f9f92b67f3cca36.zip | |
[master] Revert back automatic volume grow in case of compensate for crowded volumes (#6267)
brought back the Automatic Volume Grow to compensate for crowded volumes
| -rw-r--r-- | weed/server/master_grpc_server_volume.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/server/master_grpc_server_volume.go b/weed/server/master_grpc_server_volume.go index e4a00422f..cc9bc3c51 100644 --- a/weed/server/master_grpc_server_volume.go +++ b/weed/server/master_grpc_server_volume.go @@ -71,6 +71,9 @@ func (ms *MasterServer) ProcessGrowRequest() { case mustGrow > 0: vgr.WritableVolumeCount = uint32(mustGrow) _, err = ms.VolumeGrow(ctx, vgr) + case lastGrowCount > 0 && writable < int(lastGrowCount*2) && float64(crowded+volumeGrowStepCount) > float64(writable)*topology.VolumeGrowStrategy.Threshold: + vgr.WritableVolumeCount = volumeGrowStepCount + _, err = ms.VolumeGrow(ctx, vgr) default: for _, dc := range dcs { if vl.ShouldGrowVolumesByDataNode("DataCenter", dc) { |
