mirror of https://github.com/milvus-io/milvus.git
Update DataNode state before stop (#12946)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/12893/head
parent
214f40b209
commit
1195f441b2
|
@ -626,6 +626,9 @@ func (node *DataNode) FlushSegments(ctx context.Context, req *datapb.FlushSegmen
|
|||
|
||||
// Stop will release DataNode resources and shutdown datanode
|
||||
func (node *DataNode) Stop() error {
|
||||
// https://github.com/milvus-io/milvus/issues/12282
|
||||
node.UpdateStateCode(internalpb.StateCode_Abnormal)
|
||||
|
||||
node.cancel()
|
||||
|
||||
node.chanMut.RLock()
|
||||
|
@ -646,9 +649,6 @@ func (node *DataNode) Stop() error {
|
|||
|
||||
node.session.Revoke(time.Second)
|
||||
|
||||
// https://github.com/milvus-io/milvus/issues/12282
|
||||
node.UpdateStateCode(internalpb.StateCode_Abnormal)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue