Skip to content

Commit

Permalink
update log
Browse files Browse the repository at this point in the history
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang committed Nov 20, 2024
1 parent 76e3b43 commit e77a1f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/tso/tso.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit e77a1f2

Please sign in to comment.