Start balanceLoop when Params.autoBalance equal to true (#12660)

Signed-off-by: xige-16 <xi.ge@zilliz.com>
This commit is contained in:
xige-16 2021-12-06 10:19:41 +08:00 committed by GitHub
parent d755c26a88
commit 7d723abdff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -100,7 +100,7 @@ queryCoord:
address: localhost
port: 19531
autoHandoff: true
autoBalance: false
autoBalance: true
overloadedMemoryThresholdPercentage: 90
balanceIntervalSeconds: 60
memoryUsageMaxDifferencePercentage: 30

View File

@ -202,8 +202,10 @@ func (qc *QueryCoord) Start() error {
qc.loopWg.Add(1)
go qc.watchHandoffSegmentLoop()
qc.loopWg.Add(1)
go qc.loadBalanceSegmentLoop()
if Params.AutoBalance {
qc.loopWg.Add(1)
go qc.loadBalanceSegmentLoop()
}
go qc.session.LivenessCheck(qc.loopCtx, func() {
log.Error("Query Coord disconnected from etcd, process will exit", zap.Int64("Server Id", qc.session.ServerID))