mirror of https://github.com/milvus-io/milvus.git
Update indexnode state to unhealthy before stopping (#12744)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/12678/head
parent
19000e6af2
commit
38956215aa
|
@ -215,6 +215,9 @@ func (i *IndexNode) Start() error {
|
||||||
|
|
||||||
// Stop closes the server.
|
// Stop closes the server.
|
||||||
func (i *IndexNode) Stop() error {
|
func (i *IndexNode) Stop() error {
|
||||||
|
// https://github.com/milvus-io/milvus/issues/12282
|
||||||
|
i.UpdateStateCode(internalpb.StateCode_Abnormal)
|
||||||
|
|
||||||
i.loopCancel()
|
i.loopCancel()
|
||||||
if i.sched != nil {
|
if i.sched != nil {
|
||||||
i.sched.Close()
|
i.sched.Close()
|
||||||
|
@ -224,9 +227,6 @@ func (i *IndexNode) Stop() error {
|
||||||
}
|
}
|
||||||
i.session.Revoke(time.Second)
|
i.session.Revoke(time.Second)
|
||||||
|
|
||||||
// https://github.com/milvus-io/milvus/issues/12282
|
|
||||||
i.UpdateStateCode(internalpb.StateCode_Abnormal)
|
|
||||||
|
|
||||||
log.Debug("Index node stopped.")
|
log.Debug("Index node stopped.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue