apache/seatunnel · warning
Snapshot was interrupted before completion
Error message
Snapshot was interrupted before completion
What it means
MySqlSnapshotSplitReadTask.execute() runs the snapshot for a MySQL split. If the snapshot thread is interrupted during doExecute (job cancel, failover, checkpoint timeout), it logs this warning and rethrows InterruptedException rather than wrapping in DebeziumException. The snapshot did not complete.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/scan/MySqlSnapshotSplitReadTask.java:119
@Override
public SnapshotResult<MySqlOffsetContext> execute(
ChangeEventSource.ChangeEventSourceContext context,
MySqlPartition partition,
MySqlOffsetContext previousOffset)
throws InterruptedException {
SnapshottingTask snapshottingTask = getSnapshottingTask(partition, previousOffset);
final SnapshotContext<MySqlPartition, MySqlOffsetContext> ctx;
try {
ctx = prepare(partition);
} catch (Exception e) {
LOG.error("Failed to initialize snapshot context.", e);
throw new RuntimeException(e);
}
try {
return doExecute(context, previousOffset, ctx, snapshottingTask);
} catch (InterruptedException e) {
LOG.warn("Snapshot was interrupted before completion");
throw e;
} catch (Exception t) {
throw new DebeziumException(t);
}
}
@Override
protected SnapshotResult<MySqlOffsetContext> doExecute(
ChangeEventSource.ChangeEventSourceContext context,
MySqlOffsetContext previousOffset,
AbstractSnapshotChangeEventSource.SnapshotContext<MySqlPartition, MySqlOffsetContext>
snapshotContext,
AbstractSnapshotChangeEventSource.SnapshottingTask snapshottingTask)
throws Exception {
final MySqlSnapshotContext ctx = (MySqlSnapshotContext) snapshotContext;
ctx.offset = offsetContext;
final BinlogOffset lowWatermark = currentBinlogOffset(jdbcConnection);View on GitHub (pinned to cf67b549a7)
Solutions
- If part of an intentional cancel/failover, resume the job from checkpoint — this log alone is informational.
- Increase checkpoint timeout/interval so snapshot phases aren't interrupted (checkpoint.timeout config).
- Reduce snapshot duration: increment source parallelism, chunk large tables, tune fetch size.
- Investigate the original interrupting failure in worker logs and fix that root cause.
- Ensure stable cluster resources (memory/CPU) to avoid task restarts mid-snapshot.
Defensive patterns
Strategy: retry
Validate before calling
// estimate snapshot duration: row counts * fetch time per chunk // set checkpoint.timeout in job config accordingly
Try / catch
try {
task.execute(ctx);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// retry the split or restore from checkpoint
} Prevention
- Raise checkpoint timeout above worst-case snapshot time
- Use chunked/parallel snapshotting for large tables
- Avoid manual cancels during the snapshot phase
- Fix any recurring worker restarts before rerunning snapshots
When it happens
Trigger: Interruption while the MySQL snapshot query/backfill loop is running — engine failover, task cancellation, or checkpoint timeout triggers an interrupt of the split reader thread.
Common situations: Very large table snapshot exceeding checkpoint timeout; worker restart during snapshot; user cancel; repeated failovers due to unstable cluster.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- Cannot read the binlog filename and position via '<showMaste
- Interrupted while emitting initial DROP TABLE events
- User does not have the 'LOCK TABLES' privilege required to o
- User does not have the 'LOCK TABLES' privilege required to o
- Read snapshot for split ${split} fail
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9a11d117b09abb3c.
Report an issue: GitHub.