Update querycoord state to unhealthy before stopping (#12905)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2021-12-07 21:27:29 +08:00 committed by GitHub
parent 2b22986e53
commit 615b23a7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,12 +221,13 @@ func (qc *QueryCoord) Start() error {
// Stop function stops watching the meta and node updates
func (qc *QueryCoord) Stop() error {
qc.UpdateStateCode(internalpb.StateCode_Abnormal)
qc.scheduler.Close()
log.Debug("close scheduler ...")
qc.indexChecker.close()
log.Debug("close index checker ...")
qc.loopCancel()
qc.UpdateStateCode(internalpb.StateCode_Abnormal)
qc.loopWg.Wait()
qc.session.Revoke(time.Second)