mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +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.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)]))
|
||||
})
|
||||
|
||||
@ -1189,9 +1189,10 @@ func (c *Core) Start() error {
|
||||
|
||||
// Stop stop rootcoord
|
||||
func (c *Core) Stop() error {
|
||||
c.UpdateStateCode(internalpb.StateCode_Abnormal)
|
||||
|
||||
c.cancel()
|
||||
c.wg.Wait()
|
||||
c.stateCode.Store(internalpb.StateCode_Abnormal)
|
||||
// wait at most one second to revoke
|
||||
c.session.Revoke(time.Second)
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user