mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
Update DataNode state before stop (#12946)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
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
Block a user