apache/seatunnel · error
Transaction was still ongoing while snapshot was taken, but…
Error message
Transaction {} was still ongoing while snapshot was taken, but is no longer completely recorded in the archive logs. Events will be lost. Oldest SCN in logs = {}, TX start SCN = {} What it means
computeStartScnForFirstMiningSession detects a transaction that was pending at snapshot time but whose start SCN is below the oldest SCN still present in the archive logs. Its change records have been purged, so those events cannot be mined and will be lost; the connector warns and clamps minScn to firstScn (oldest available log SCN).
Solutions
- Increase archive log retention (RMAN retention policy / db_recovery_file_dest_size) to cover the snapshot duration.
- Re-run the snapshot so pending transactions are fully captured within retained logs.
- Reduce snapshot duration (increase parallelism) to shrink the pending-TX window.
- For known-safe data loss, accept the warning; otherwise restore archived logs from backup before resuming.
Example fix
// before (RMAN) CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS; // after CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
Defensive patterns
Strategy: validation
Validate before calling
-- ensure oldest archived log SCN < any pending TX start SCN SELECT min(first_change#) FROM v$archived_log;
Prevention
- Retain archive logs longer than the full snapshot window.
- Speed up snapshots to shrink the pending-TX window.
- Alert on archive log deletion during initial snapshot.
When it happens
Trigger: During snapshot offset determination a pending TX start SCN < first available archive log SCN — i.e., the archive logs covering the TX start were deleted or the first mining session's start SCN is ahead of the TX start.
Common situations: Archive logs removed by RMAN/retention policy while snapshot ran; long-running transactions spanning snapshot and log cleanup; snapshot took so long that redo aged out; insufficient archive log retention for large initial snapshots.
Related errors
- Failed to start Oracle LogMiner session, retrying...
- Could not query the view
- not support this type of bufferType
- Cannot convert timestamp to SCN. Make sure the specified…
- Cannot get maximum archive log SCN as no archive logs are…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/b24a4cace8329b45.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/io/debezium/connector/oracle/logminer/LogMinerStreamingChangeEventSource.java:308
// was taken.
Map<String, Scn> snapshotPendingTransactions =
offsetContext.getSnapshotPendingTransactions();
if (snapshotPendingTransactions == null || snapshotPendingTransactions.isEmpty()) {
// no pending transactions, we can start mining from the snapshot SCN
startScn = snapshotScn;
} else {
// find the oldest transaction we can still fully process, and start from there.
Scn minScn = snapshotScn;
for (Map.Entry<String, Scn> entry : snapshotPendingTransactions.entrySet()) {
String transactionId = entry.getKey();
Scn scn = entry.getValue();
LOGGER.info(
"Transaction {} was pending across snapshot boundary. Start SCN = {}, snapshot SCN = {}",
transactionId,
scn,
startScn);
if (scn.compareTo(firstScn) < 0) {
LOGGER.warn(
"Transaction {} was still ongoing while snapshot was taken, but is no longer completely recorded in the archive logs. Events will be lost. Oldest SCN in logs = {}, TX start SCN = {}",
transactionId,
firstScn,
scn);
minScn = firstScn;
} else if (scn.compareTo(minScn) < 0) {
minScn = scn;
}
}
// Make sure the commit SCN is at least the snapshot SCN - 1.
// This ensures we'll never emit events for transactions that were complete before the
// snapshot was
// taken.
if (offsetContext.getCommitScn().compareTo(snapshotScn) < 0) {
LOGGER.info(
"Setting commit SCN to {} (snapshot SCN - 1) to ensure we don't double-emit events from pre-snapshot transactions.",
snapshotScn.subtract(Scn.ONE));View on GitHub (pinned to cf67b549a7)