Skip to content

Commit

Permalink
ticdc:Fix too much unnecessary log for lastSyncedTs (#10667)
Browse files Browse the repository at this point in the history
close #10289
  • Loading branch information
hongyunyan authored Feb 29, 2024
1 parent 92fc6d1 commit 108d0e9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cdc/owner/changefeed.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,15 @@ func (c *changefeed) tick(ctx cdcContext.Context,
if err != nil {
return 0, 0, errors.Trace(err)
}
if c.lastSyncedTs < watermark.LastSyncedTs {
c.lastSyncedTs = watermark.LastSyncedTs
} else if c.lastSyncedTs > watermark.LastSyncedTs {
log.Warn("LastSyncedTs should not be greater than newLastSyncedTs",
zap.Uint64("c.LastSyncedTs", c.lastSyncedTs),
zap.Uint64("newLastSyncedTs", watermark.LastSyncedTs))

if watermark.LastSyncedTs != scheduler.CheckpointCannotProceed {
if c.lastSyncedTs < watermark.LastSyncedTs {
c.lastSyncedTs = watermark.LastSyncedTs
} else if c.lastSyncedTs > watermark.LastSyncedTs {
log.Warn("LastSyncedTs should not be greater than newLastSyncedTs",
zap.Uint64("c.LastSyncedTs", c.lastSyncedTs),
zap.Uint64("newLastSyncedTs", watermark.LastSyncedTs))
}
}

if watermark.PullerResolvedTs != scheduler.CheckpointCannotProceed && watermark.PullerResolvedTs != math.MaxUint64 {
Expand Down

0 comments on commit 108d0e9

Please sign in to comment.