mirror of https://github.com/milvus-io/milvus.git
Fix panic when close IndexCoord (#14611)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>pull/14743/head
parent
4b4e29df92
commit
4f71fff388
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue