enable auto balance paramter(#21504) (#21507)

Signed-off-by: MrPresent-Han <jamesharden11122@gmail.com>
pull/21555/head
MrPresent-Han 2023-01-06 14:45:35 +08:00 committed by GitHub
parent 73d8509600
commit 6fb3542f2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ func (b *BalanceChecker) Description() string {
func (b *BalanceChecker) Check(ctx context.Context) []task.Task {
ret := make([]task.Task, 0)
if !Params.QueryCoordCfg.AutoBalance.GetAsBool() {
return ret
}
segmentPlans, channelPlans := b.Balance.Balance()
tasks := balance.CreateSegmentTasksFromPlans(ctx, b.ID(), Params.QueryCoordCfg.SegmentTaskTimeout.GetAsDuration(time.Millisecond), segmentPlans)