From 0903d7cb0f27a6769734c5e1235b34ba58b9be28 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Wed, 20 Nov 2024 15:47:41 +0800 Subject: [PATCH] add debug log Signed-off-by: Ryan Leung --- pkg/syncer/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/syncer/client.go b/pkg/syncer/client.go index a094ed0988d..c519da09fa4 100644 --- a/pkg/syncer/client.go +++ b/pkg/syncer/client.go @@ -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): } @@ -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): }