mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +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 {
|
func (qc *QueryCoord) Stop() error {
|
||||||
qc.UpdateStateCode(internalpb.StateCode_Abnormal)
|
qc.UpdateStateCode(internalpb.StateCode_Abnormal)
|
||||||
|
|
||||||
qc.scheduler.Close()
|
if qc.scheduler != nil {
|
||||||
log.Debug("close scheduler ...")
|
qc.scheduler.Close()
|
||||||
qc.indexChecker.close()
|
log.Debug("close scheduler ...")
|
||||||
log.Debug("close index checker ...")
|
}
|
||||||
qc.loopCancel()
|
|
||||||
|
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.loopWg.Wait()
|
||||||
qc.session.Revoke(time.Second)
|
qc.session.Revoke(time.Second)
|
||||||
|
Loading…
Reference in New Issue
Block a user