Apache Software Foundation / SeaTunnel
Merged upstreamCorrectnessSelected contributionMerged Jul 25, 2026

Use checkpoint offset for timestamp startup restore

Fixed SeaTunnel MySQL CDC checkpoint restore behavior for timestamp startup mode so restored jobs resume from the saved binlog position.

apache/seatunnel · #10987

Problem

For startup.mode = timestamp, SeaTunnel could recompute the original configured timestamp after a checkpoint restore instead of honoring the concrete binlog file and position already persisted by the reader. In long-running jobs, that could move recovery back to an old timestamp anchor and fail when older binlogs were purged or corrupted.

Approach

Added a timestamp-only offset guard, reused restored binlog offsets directly during startup offset resolution, skipped the timestamp filter for restored concrete offsets, and pinned the behavior with focused MySQL CDC unit tests.

Impact and scope

  • Improves reliability for long-running MySQL CDC pipelines that use timestamp startup and checkpoint recovery.
  • Prevents restored jobs from rewinding to the original timestamp when a checkpoint already contains a concrete binlog position.
  • Avoids unnecessary timestamp-to-binlog lookup and timestamp filtering on the restore path.

Validation

  • Added unit coverage for timestamp-only bootstrap offsets, restored binlog offsets, and binlog timestamp-filter decisions.
  • Verified with the connector Maven package command documented in the PR.
  • Merged after maintainer approval on July 25, 2026, closing the linked MySQL CDC recovery issue.