Fix ts loop

Signed-off-by: neza2017 <yefu.chen@zilliz.com>
This commit is contained in:
neza2017 2021-03-15 15:45:17 +08:00 committed by yefu.chen
parent c1dcc7c88a
commit 9e0fc0b169

View File

@ -368,12 +368,12 @@ func (c *Core) tsLoop() {
select {
case <-tsoTicker.C:
if err := c.tsoAllocator.UpdateTSO(); err != nil {
log.Warn("failed to update timestamp", zap.String("error", err.Error()))
return
log.Warn("failed to update timestamp: ", zap.Error(err))
continue
}
if err := c.idAllocator.UpdateID(); err != nil {
log.Warn("failed to update id", zap.String("error", err.Error()))
return
log.Warn("failed to update id: ", zap.Error(err))
continue
}
case <-ctx.Done():
// Server is closed and it should return nil.