mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
Update rootcoord state to unhealthy before stopping (#12845)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
ad4c808207
commit
e4de86ba42
@ -1180,7 +1180,7 @@ func (c *Core) Start() error {
|
|||||||
Params.CreatedTime = time.Now()
|
Params.CreatedTime = time.Now()
|
||||||
Params.UpdatedTime = time.Now()
|
Params.UpdatedTime = time.Now()
|
||||||
|
|
||||||
c.stateCode.Store(internalpb.StateCode_Healthy)
|
c.UpdateStateCode(internalpb.StateCode_Healthy)
|
||||||
log.Debug(typeutil.RootCoordRole+" start successfully ", zap.String("State Code", internalpb.StateCode_name[int32(internalpb.StateCode_Healthy)]))
|
log.Debug(typeutil.RootCoordRole+" start successfully ", zap.String("State Code", internalpb.StateCode_name[int32(internalpb.StateCode_Healthy)]))
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1189,9 +1189,10 @@ func (c *Core) Start() error {
|
|||||||
|
|
||||||
// Stop stop rootcoord
|
// Stop stop rootcoord
|
||||||
func (c *Core) Stop() error {
|
func (c *Core) Stop() error {
|
||||||
|
c.UpdateStateCode(internalpb.StateCode_Abnormal)
|
||||||
|
|
||||||
c.cancel()
|
c.cancel()
|
||||||
c.wg.Wait()
|
c.wg.Wait()
|
||||||
c.stateCode.Store(internalpb.StateCode_Abnormal)
|
|
||||||
// wait at most one second to revoke
|
// wait at most one second to revoke
|
||||||
c.session.Revoke(time.Second)
|
c.session.Revoke(time.Second)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user