apache/seatunnel · warning

Commit row has no matched prewrite row yet, hold it and stop

Error message

Commit row has no matched prewrite row yet, hold it and stop advancing resolvedTs. commitTs: {}, startTs: {}, key: {}

What it means

When flushing resolved TS events, if a COMMIT row has no matching PREWRITE row in the preWrites buffer (preWrites.remove returned null), the reader cannot pair them. It holds the commit row, lowers safeResolvedTs to commitTs-1 to stop advancing, logs this warning and breaks. This protects against emitting out-of-order/incomplete transactions.

Source

Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-tidb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/tidb/source/reader/TiDBSourceReader.java:402

            default:
                log.warn("Unsupported row type:" + row.getType());
        }
        return true;
    }

    protected void flushRows(final long resolvedTs) throws Exception {
        flushRowsAndGetSafeResolvedTs(resolvedTs);
    }

    private long flushRowsAndGetSafeResolvedTs(final long resolvedTs) throws Exception {
        long safeResolvedTs = resolvedTs;
        while (!commits.isEmpty() && commits.firstKey().getTimestamp() <= resolvedTs) {
            final RowKeyWithTs commitKey = commits.firstKey();
            final Cdcpb.Event.Row commitRow = commits.firstEntry().getValue();
            final Cdcpb.Event.Row prewriteRow = preWrites.remove(RowKeyWithTs.ofStart(commitRow));
            if (prewriteRow == null) {
                safeResolvedTs = Math.min(safeResolvedTs, commitKey.getTimestamp() - 1);
                log.warn(
                        "Commit row has no matched prewrite row yet, hold it and stop advancing resolvedTs. "
                                + "commitTs: {}, startTs: {}, key: {}",
                        commitRow.getCommitTs(),
                        commitRow.getStartTs(),
                        commitRow.getKey());
                break;
            }
            commits.pollFirstEntry();
            // if pull cdc event block when region split, cdc event will lose.
            committedEvents.offer(prewriteRow);
            totalCommittedRows++;
        }
        return safeResolvedTs;
    }

    private void logStreamingStats(
            TiDBSourceSplit split,
            long startResolvedTs,

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check preceding warnings (3192 unsupported row types) that may have dropped the prewrite; upgrade the connector if so.
  2. Restart the CDC job from a checkpoint/snapshot to resync prewrite/commit streams.
  3. If it stalls permanently, verify TiKV cluster health (region balance) and TiCDC protocol version alignment.
Defensive patterns

Strategy: retry

Prevention

When it happens

Trigger: flushRowsAndGetSafeResolvedTs processes commits whose prewrite event has not yet been received from TiKV (out-of-order delivery across regions, or the prewrite was consumed under a type the connector skipped).

Common situations: TiKV region rescheduling/split-merge causing event reordering; very long-running prewrites; previous 'Unsupported row type' warnings having silently dropped the matching prewrite row.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/b086464e27247f90. Report an issue: GitHub.