apache/seatunnel · error · CouchbaseConnectorException
UNSUPPORTED_ROW_KIND
UNSUPPORTED_ROW_KIND
Error message
RowKind.DELETE is not supported by the Couchbase sink. CDC delete handling is out of scope for the initial implementation.
What it means
The Couchbase sink does not implement delete semantics. write() skips UPDATE_BEFORE rows but rejects RowKind.DELETE with UNSUPPORTED_ROW_KIND because CDC delete handling is out of scope. Any stream carrying deletes into this sink will fail at write time.
Source
Thrown at seatunnel-connectors-v2/connector-couchbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/couchbase/sink/CouchbaseWriter.java:169
* because CDC delete support is out of scope for this initial implementation.
*
* <p>The row's document id is assigned here, at buffer-add time, so that every subsequent flush
* attempt (including a {@link #close}-triggered re-flush of a buffer that a prior flush left
* un-cleared) uses the same stable id. This prevents silent duplicate documents when no primary
* key is configured (UUID path) and prevents spurious {@link
* com.couchbase.client.core.error.DocumentExistsException} collisions on already-committed rows
* when a primary key is configured and insert mode is active.
*
* @param row the incoming row throws the CouchBaseConnectorException if the row kind is {@code
* DELETE}
*/
@Override
public void write(SeaTunnelRow row) {
if (row.getRowKind() == RowKind.UPDATE_BEFORE) {
return;
}
if (row.getRowKind() == RowKind.DELETE) {
throw new CouchbaseConnectorException(
CouchbaseConnectorErrorCode.UNSUPPORTED_ROW_KIND,
"RowKind.DELETE is not supported by the Couchbase sink. "
+ "CDC delete handling is out of scope for the initial implementation.");
}
// Assign the document id at buffer-add time (not inside doFlush) so that if close()
// triggers a second doFlush() on a not-yet-cleared buffer the same ids are reused.
JsonObject doc = toJsonObject(row);
WriteUnit unit = new WriteUnit(buildDocumentKey(doc), doc);
synchronized (this) {
buffer.add(unit);
if (isOverMaxBatchSizeLimit()) {
doFlush();
}
}
}
@Override
public Optional<Void> prepareCommit() {View on GitHub (pinned to cf67b549a7)
Solutions
- Filter out DELETE rows upstream with a SQL transform (e.g. WHERE __op != 'DELETE') or a filter RowKind step
- Avoid enabling delete propagation from the CDC source into this sink
- If deletes must be replicated, use a sink that supports CDC deletes
Example fix
// before
transform {
Sql { source_table_name = "cdc"; result_table_name = "out"; query = "select * from cdc" }
}
// after
transform {
Sql { source_table_name = "cdc"; result_table_name = "out"; query = "select * from cdc where __op <> 'DELETE'" }
} Defensive patterns
Strategy: try-catch
Type guard
java
if (row.getRowKind() == RowKind.DELETE) { /* skip or route elsewhere */ } Try / catch
java
try {
writer.write(row);
} catch (CouchbaseConnectorException e) {
if ("UNSUPPORTED_ROW_KIND".equals(e.getErrorCode().name())) {
// filter DELETE rows upstream and resubmit
}
} Prevention
- Filter DELETE RowKind rows before the Couchbase sink when using CDC sources
- Check source CDC delete propagation options and disable them
When it happens
Trigger: Feeding a CDC source (MySQL-CDC, Debezium-style) whose stream includes RowKind.DELETE rows into the Couchbase sink; enabling sink.enable-delete or similar delete propagation in upstream config.
Common situations: CDC pipelines replicating deletes; jobs where an upstream transform emits delete rows (e.g. filter or dedup transforms configured to emit deletes).
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- COMMON_UNSUPPORTED_OPERATION
- Need to add support for executed GTIDs for versions prior to
- Unsupported rowKind: " + rowKind
- UNSUPPORTED_ROW_KIND
- UNSUPPORTED_OPERATION
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/45b09df34d4c7954.
Report an issue: GitHub.