From f564ea7fc761763217b848504b0ff9ee3e5c8a61 Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Tue, 18 Jan 2022 12:09:37 +0800 Subject: [PATCH] RootCoord set healthy state after registered service (#15261) Signed-off-by: cai.zhang --- internal/distributed/rootcoord/service.go | 1 + internal/rootcoord/root_coord.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/distributed/rootcoord/service.go b/internal/distributed/rootcoord/service.go index f81f572759..9171386bf4 100644 --- a/internal/distributed/rootcoord/service.go +++ b/internal/distributed/rootcoord/service.go @@ -275,6 +275,7 @@ func (s *Server) start() error { log.Error("RootCoord registers service failed", zap.Error(err)) return err } + return nil } diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index 407663f878..88ab26e16f 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -937,6 +937,9 @@ func (c *Core) Register() error { syscall.Kill(syscall.Getpid(), syscall.SIGINT) } }) + + c.UpdateStateCode(internalpb.StateCode_Healthy) + log.Debug("RootCoord start successfully ", zap.String("State Code", internalpb.StateCode_Healthy.String())) return nil } @@ -1194,9 +1197,6 @@ func (c *Core) Start() error { go c.checkFlushedSegmentsLoop() Params.RootCoordCfg.CreatedTime = time.Now() Params.RootCoordCfg.UpdatedTime = time.Now() - - c.UpdateStateCode(internalpb.StateCode_Healthy) - log.Debug("RootCoord start successfully ", zap.String("State Code", internalpb.StateCode_Healthy.String())) }) return nil