Skip to content

Commit

Permalink
add debug log
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Nov 20, 2024
1 parent 4f97ed8 commit 0903d7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/syncer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (s *RegionSyncer) StartSyncWithLeader(addr string) {
log.Error("server failed to establish sync stream with leader", zap.String("server", s.server.Name()), zap.String("leader", s.server.GetLeader().GetName()), errs.ZapError(err))
select {
case <-ctx.Done():
log.Info("context is done, server stops to synchronize with leader", zap.String("server", s.server.Name()), zap.String("leader", s.server.GetLeader().GetName()))
return
case <-time.After(retryInterval):
}
Expand All @@ -172,6 +173,7 @@ func (s *RegionSyncer) StartSyncWithLeader(addr string) {
}
select {
case <-ctx.Done():
log.Info("context is done, server stops to synchronize with leader", zap.String("server", s.server.Name()), zap.String("leader", s.server.GetLeader().GetName()))
return
case <-time.After(retryInterval):
}
Expand Down

0 comments on commit 0903d7c

Please sign in to comment.