mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 12:29:36 +08:00
Fix close querycoord panic (#14239)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
parent
d38b6f8445
commit
73c5653c76
@ -241,11 +241,20 @@ func (qc *QueryCoord) Start() error {
|
||||
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()
|
||||
if qc.scheduler != nil {
|
||||
qc.scheduler.Close()
|
||||
log.Debug("close scheduler ...")
|
||||
}
|
||||
|
||||
if qc.indexChecker != nil {
|
||||
qc.indexChecker.close()
|
||||
log.Debug("close index checker ...")
|
||||
}
|
||||
|
||||
if qc.loopCancel != nil {
|
||||
qc.loopCancel()
|
||||
log.Info("cancel the loop of QueryCoord")
|
||||
}
|
||||
|
||||
qc.loopWg.Wait()
|
||||
qc.session.Revoke(time.Second)
|
||||
|
Loading…
Reference in New Issue
Block a user