From e77a1f27ef0cc8456e7a6e823596d200f8af1fb8 Mon Sep 17 00:00:00 2001 From: okJiang <819421878@qq.com> Date: Wed, 20 Nov 2024 15:00:43 +0800 Subject: [PATCH] update log Signed-off-by: okJiang <819421878@qq.com> --- pkg/tso/tso.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/tso/tso.go b/pkg/tso/tso.go index 87d5f9a14ae..b3d198bc812 100644 --- a/pkg/tso/tso.go +++ b/pkg/tso/tso.go @@ -298,8 +298,7 @@ func (t *timestampOracle) resetUserTimestampInner(leadership *election.Leadershi return nil } -// UpdateTimestamp is used to update the timestamp. -// This function will do two things: +// UpdateTimestamp will do two things: // 1. When the logical time is going to be used up, increase the current physical time. // 2. When the time window is not big enough, which means the saved etcd time minus the next physical time // will be less than or equal to `UpdateTimestampGuard`, then the time window needs to be updated and @@ -332,7 +331,7 @@ func (t *timestampOracle) UpdateTimestamp() error { jetLag := typeutil.SubRealTimeByWallClock(now, prevPhysical) if jetLag > 3*t.updatePhysicalInterval && jetLag > jetLagWarningThreshold { - log.Warn("clock offset", + log.Warn("There hasn't been a physical time update for a while, which may caused by PD restart, leader transfer, etcd IO lag, local time offset etc.", logutil.CondUint32("keyspace-group-id", t.keyspaceGroupID, t.keyspaceGroupID > 0), zap.Duration("jet-lag", jetLag), zap.Time("prev-physical", prevPhysical),