diff --git a/cdc/owner/changefeed.go b/cdc/owner/changefeed.go index b8881dcc0ac..b201f6bb6d2 100755 --- a/cdc/owner/changefeed.go +++ b/cdc/owner/changefeed.go @@ -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 {