未验证 提交 4f71fff3 编写于 作者: J Jiquan Long 提交者: GitHub

Fix panic when close IndexCoord (#14611)

Signed-off-by: Ndragondriver <jiquan.long@zilliz.com>
上级 4b4e29df
......@@ -291,9 +291,18 @@ func (i *IndexCoord) Stop() error {
// https://github.com/milvus-io/milvus/issues/12282
i.UpdateStateCode(internalpb.StateCode_Abnormal)
i.loopCancel()
i.sched.Close()
if i.loopCancel != nil {
i.loopCancel()
log.Info("cancel the loop of IndexCoord")
}
if i.sched != nil {
i.sched.Close()
log.Info("close the task scheduler of IndexCoord")
}
i.loopWg.Wait()
for _, cb := range i.closeCallbacks {
cb()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册