mirror of https://github.com/milvus-io/milvus.git
fix: Fix channel manager bg checker exit when disable auto balance (#28459)
issue: #28454 Signed-off-by: Wei Liu <wei.liu@zilliz.com>pull/28576/head
parent
13a5b9f64a
commit
fdbca10e23
|
@ -262,7 +262,8 @@ func (c *ChannelManager) bgCheckChannelsWork(ctx context.Context) {
|
|||
return
|
||||
case <-ticker.C:
|
||||
if !Params.DataCoordCfg.AutoBalance.GetAsBool() {
|
||||
return
|
||||
log.Info("auto balance disabled, skip auto bg check balance")
|
||||
continue
|
||||
}
|
||||
|
||||
c.mu.Lock()
|
||||
|
|
|
@ -1239,6 +1239,7 @@ func TestChannelManager_HelperFunc(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestChannelManager_BackgroundChannelChecker(t *testing.T) {
|
||||
Params.Save(Params.DataCoordCfg.AutoBalance.Key, "false")
|
||||
Params.Save(Params.DataCoordCfg.ChannelBalanceInterval.Key, "1")
|
||||
Params.Save(Params.DataCoordCfg.ChannelBalanceSilentDuration.Key, "1")
|
||||
|
||||
|
@ -1279,7 +1280,6 @@ func TestChannelManager_BackgroundChannelChecker(t *testing.T) {
|
|||
go c.bgCheckChannelsWork(ctx)
|
||||
|
||||
updateCounter := atomic.NewInt64(0)
|
||||
|
||||
mockStore.EXPECT().Update(mock.Anything).Run(func(op *ChannelOpSet) {
|
||||
updateCounter.Inc()
|
||||
}).Return(nil).Maybe()
|
||||
|
|
Loading…
Reference in New Issue