[master] Do Automatic Volume Grow in background (#5781)

* Do Automatic Volume Grow in backgound

* pass lastGrowCount to master

* fix build

* fix count to uint64
This commit is contained in:
Konstantin Lebedev
2024-07-16 20:03:40 +05:00
committed by GitHub
parent ce61a66b65
commit 67edf1d014
8 changed files with 93 additions and 43 deletions

View File

@@ -74,6 +74,7 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
}
vl := ms.Topo.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.DiskType)
vl.SetLastGrowCount(req.WritableVolumeCount)
var (
lastErr error
@@ -91,7 +92,7 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
vl.AddGrowRequest()
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
Option: option,
Count: int(req.WritableVolumeCount),
Count: req.WritableVolumeCount,
}
}
if err != nil {