Fix Root Start hang (#10765)

Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
pull/10723/head
Xiaofan 2021-10-27 22:00:27 +08:00 committed by GitHub
parent 6fddcb3925
commit 76ef1c9657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -1088,19 +1088,19 @@ func (c *Core) Start() error {
c.startOnce.Do(func() {
if err := c.proxyManager.WatchProxy(); err != nil {
log.Debug("RootCoord Start WatchProxy failed", zap.Error(err))
return
log.Fatal("RootCoord Start WatchProxy failed", zap.Error(err))
// you can not just stuck here,
panic(err)
}
if err := c.reSendDdMsg(c.ctx, false); err != nil {
log.Debug("RootCoord Start reSendDdMsg failed", zap.Error(err))
return
log.Fatal("RootCoord Start reSendDdMsg failed", zap.Error(err))
panic(err)
}
c.wg.Add(4)
go c.startTimeTickLoop()
go c.tsLoop()
go c.chanTimeTick.StartWatch(&c.wg)
go c.checkFlushedSegmentsLoop()
go c.session.LivenessCheck(c.ctx, func() {
log.Error("Root Coord disconnected from etcd, process will exit", zap.Int64("Server Id", c.session.ServerID))
})
@ -1108,10 +1108,9 @@ func (c *Core) Start() error {
Params.UpdatedTime = time.Now()
c.stateCode.Store(internalpb.StateCode_Healthy)
log.Debug(typeutil.RootCoordRole+" start successfully ", zap.String("State Code", internalpb.StateCode_name[int32(internalpb.StateCode_Healthy)]))
})
log.Debug(typeutil.RootCoordRole, zap.String("State Code", internalpb.StateCode_name[int32(internalpb.StateCode_Healthy)]))
return nil
}