Skip to content

Commit

Permalink
ticdc:Fix too much unnecessary log for lastSyncedTs (#10667) (#10683)
Browse files Browse the repository at this point in the history
close #10289
  • Loading branch information
ti-chi-bot authored Mar 1, 2024
1 parent 81a35bf commit 988f039
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 @@ -385,12 +385,15 @@ func (c *changefeed) tick(ctx cdcContext.Context, captures map[model.CaptureID]*
if err != nil {
return 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 988f039

Please sign in to comment.