{"record":{"id":"520703772e02efc6","repo":"apache/seatunnel","slug":"snapshot-was-interrupted-before-completion-520703","errorCode":null,"errorMessage":"Snapshot was interrupted before completion","messagePattern":"Snapshot was interrupted before completion","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/reader/fetch/scan/OracleSnapshotSplitReadTask.java","lineNumber":111,"sourceCode":"\n    @Override\n    public SnapshotResult<OracleOffsetContext> execute(\n            ChangeEventSourceContext context,\n            OraclePartition partition,\n            OracleOffsetContext previousOffset)\n            throws InterruptedException {\n        SnapshottingTask snapshottingTask = getSnapshottingTask(partition, previousOffset);\n        final SnapshotContext<OraclePartition, OracleOffsetContext> ctx;\n        try {\n            ctx = prepare(partition);\n        } catch (Exception e) {\n            LOG.error(\"Failed to initialize snapshot context.\", e);\n            throw new RuntimeException(e);\n        }\n        try {\n            return doExecute(context, previousOffset, ctx, snapshottingTask);\n        } catch (InterruptedException e) {\n            LOG.warn(\"Snapshot was interrupted before completion\");\n            throw e;\n        } catch (Exception t) {\n            throw new DebeziumException(t);\n        } finally {\n            complete(ctx);\n        }\n    }\n\n    @Override\n    protected SnapshotResult<OracleOffsetContext> doExecute(\n            ChangeEventSourceContext context,\n            OracleOffsetContext previousOffset,\n            SnapshotContext snapshotContext,\n            SnapshottingTask snapshottingTask)\n            throws Exception {\n        final OracleSnapshotContext ctx = (OracleSnapshotContext) snapshotContext;\n        ctx.offset = offsetContext;\n","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/reader/fetch/scan/OracleSnapshotSplitReadTask.java#L93-L129","documentation":"Oracle snapshot split read task logs 'Snapshot was interrupted before completion' (WARN) when doExecute() throws InterruptedException during snapshot reading. The InterruptedException is rethrown to the caller, so the snapshot phase of the CDC source fails. This signals the snapshot thread was cancelled/interrupted rather than a data error.","triggerScenarios":"OracleSnapshotSplitReadTask.execute() calls doExecute() and the snapshot reading thread receives an interrupt — typically job cancellation, checkpoint/task cancellation by the engine, or shutdown while the reader is streaming the snapshot split.","commonSituations":"User cancels a running CDC job mid-snapshot; the Zeta/Flink engine cancels a task due to checkpoint timeout or restart; cluster shutdown during the initial snapshot phase.","solutions":["If the interruption was expected (job cancel/stop), no fix is needed; treat as normal shutdown logging.","If unexpected, check engine logs for the root cause of cancellation (checkpoint timeout, OOM, failover) before this interrupt.","Increase checkpoint timeout / adjust task restart strategy so snapshot tasks are not cancelled mid-run.","Retry the job; snapshot splits are restartable and will resume from offsets."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    // run CDC job / snapshot phase\n} catch (InterruptedException e) {\n    Thread.currentThread().interrupt(); // preserve interrupt status\n    // treat as cancellation: stop cleanly, job restart will resume snapshot\n}","preventionTips":["Avoid cancelling jobs mid-snapshot unless intended","Configure adequate checkpoint timeout so snapshot tasks are not force-cancelled","Monitor engine logs for failover/OOM that triggers task interruption","Keep snapshot splits restartable by persisting offsets"],"tags":["cdc","oracle","snapshot","interrupted","job-cancellation"],"backgroundTag":"operation-interrupted","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}