Skip to content

Commit

Permalink
syncer: make log clearer when load region (#8718)
Browse files Browse the repository at this point in the history
close #8717

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
lhy1024 and ti-chi-bot[bot] authored Oct 16, 2024
1 parent b70107e commit 48db925
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/syncer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ func (s *RegionSyncer) StartSyncWithLeader(addr string) {
log.Info("region syncer start load region")
start := time.Now()
err := storage.TryLoadRegionsOnce(ctx, regionStorage, bc.CheckAndPutRegion)
log.Info("region syncer finished load regions", zap.Duration("time-cost", time.Since(start)))
if err != nil {
log.Warn("failed to load regions", errs.ZapError(err))
log.Warn("region syncer failed to load regions", errs.ZapError(err), zap.Duration("time-cost", time.Since(start)))
} else {
log.Info("region syncer finished load regions", zap.Duration("time-cost", time.Since(start)))
}
// establish client.
conn := grpcutil.CreateClientConn(ctx, addr, s.tlsConfig,
Expand Down

0 comments on commit 48db925

Please sign in to comment.