Skip to content

Commit

Permalink
syncer: make log clearer when load region
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Oct 16, 2024
1 parent 3d4c416 commit 7a5c41e
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 7a5c41e

Please sign in to comment.