mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: enable stopping balance after balance has been suspended (#32812)
issue: #32811 Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
ba02d54a30
commit
fad8f0afa5
@ -116,10 +116,12 @@ func (b *BalanceChecker) replicasToBalance() []int64 {
|
||||
}
|
||||
}
|
||||
|
||||
// no stopping balance and auto balance is disabled, return empty collections for balance
|
||||
if !Params.QueryCoordCfg.AutoBalance.GetAsBool() {
|
||||
// 1. no stopping balance and auto balance is disabled, return empty collections for balance
|
||||
// 2. when balancer isn't active, skip auto balance
|
||||
if !Params.QueryCoordCfg.AutoBalance.GetAsBool() || !b.IsActive() {
|
||||
return nil
|
||||
}
|
||||
|
||||
// scheduler is handling segment task, skip
|
||||
if b.scheduler.GetSegmentTaskNum() != 0 {
|
||||
return nil
|
||||
@ -168,9 +170,6 @@ func (b *BalanceChecker) balanceReplicas(replicaIDs []int64) ([]balance.SegmentA
|
||||
}
|
||||
|
||||
func (b *BalanceChecker) Check(ctx context.Context) []task.Task {
|
||||
if !b.IsActive() {
|
||||
return nil
|
||||
}
|
||||
ret := make([]task.Task, 0)
|
||||
|
||||
replicasToBalance := b.replicasToBalance()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user