From 5e20e57e7d8b79df3d5b88f8da147f3d4bd8df66 Mon Sep 17 00:00:00 2001 From: Cabinfever_B Date: Fri, 25 Aug 2023 17:56:54 +0800 Subject: [PATCH 1/2] add log Signed-off-by: Cabinfever_B --- pkg/election/lease.go | 2 +- server/cluster/cluster.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/election/lease.go b/pkg/election/lease.go index 441f66a4cbd..eada4f8786d 100644 --- a/pkg/election/lease.go +++ b/pkg/election/lease.go @@ -167,7 +167,7 @@ func (l *lease) keepAliveWorker(ctx context.Context, interval time.Duration) <-c } res, err := l.lease.KeepAliveOnce(ctx1, leaseID) if err != nil { - log.Warn("lease keep alive failed", zap.String("purpose", l.Purpose), errs.ZapError(err)) + log.Warn("lease keep alive failed", zap.String("purpose", l.Purpose), zap.Time("start", start), errs.ZapError(err)) return } if res.TTL > 0 { diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go index 8afb1796068..f531375cfa7 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -446,6 +446,8 @@ func (c *RaftCluster) runStoreConfigSync() { init = true ticker.Stop() ticker = time.NewTicker(time.Minute) + } else if !init && !c.opt.GetStoreConfig().IsSynced() { + log.Warn("init sync store config is not completed") } select { case <-c.ctx.Done(): From b9e4392dde4d63e5fd1ced934de231d78934c8a9 Mon Sep 17 00:00:00 2001 From: Cabinfever_B Date: Fri, 25 Aug 2023 17:58:07 +0800 Subject: [PATCH 2/2] add log Signed-off-by: Cabinfever_B --- server/cluster/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go index f531375cfa7..fd8c969695b 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -447,7 +447,7 @@ func (c *RaftCluster) runStoreConfigSync() { ticker.Stop() ticker = time.NewTicker(time.Minute) } else if !init && !c.opt.GetStoreConfig().IsSynced() { - log.Warn("init sync store config is not completed") + log.Warn("first sync store config is not completed") } select { case <-c.ctx.Done():