apache/seatunnel · error · TypesenseConnectorException
UNSUPPORTED_OPERATION
UNSUPPORTED_OPERATION
Error message
Unsupported write row kind:
What it means
TypesenseSinkWriter.write handles only INSERT (upsert), DELETE, and UPDATE_BEFORE row kinds. Any other RowKind arriving at the sink (e.g. UPDATE_AFTER in a changelog stream, or anything unexpected) falls through to default and throws TypesenseConnectorException(UNSUPPORTED_OPERATION, "Unsupported write row kind: " + kind).
Source
Thrown at seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/sink/TypesenseSinkWriter.java:104
return;
}
switch (element.getRowKind()) {
case INSERT:
case UPDATE_AFTER:
String indexRequestRow = seaTunnelRowSerializer.serializeRow(element);
requestEsList.add(indexRequestRow);
if (requestEsList.size() >= maxBatchSize) {
insert(collection, requestEsList);
}
break;
case UPDATE_BEFORE:
case DELETE:
String id = seaTunnelRowSerializer.serializeRowForDelete(element);
typesenseClient.deleteCollectionData(collection, id);
break;
default:
throw new TypesenseConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,
"Unsupported write row kind: " + element.getRowKind());
}
}
@Override
public Optional<TypesenseCommitInfo> prepareCommit() {
insert(this.collection, this.requestEsList);
return Optional.empty();
}
private void insert(String collection, List<String> requestEsList) {
try {
RetryUtils.retryWithException(
() -> {
typesenseClient.insert(collection, requestEsList);
return null;
},View on GitHub (pinned to cf67b549a7)
Solutions
- Configure the pipeline so updates are delivered as DELETE+INSERT or as supported kinds (e.g. enable upsert/delete handling on the source or insert a transform).
- Use a sink/source option that collapses changelog to append-only if Typesense semantics allow.
- Patch TypesenseSinkWriter.write to map UPDATE_AFTER to a document upsert.
Example fix
// before
stream that emits UPDATE_AFTER rows -> Typesense sink
// after
source(CDC, emit-upsert-as-delete-and-insert=true) -> Typesense sink
// or in code:
case UPDATE_AFTER:
upsertDocument(element);
break; Defensive patterns
Strategy: validation
Validate before calling
// ensure changelog kinds are limited to supported ones before the sink
if (row.getRowKind() != RowKind.INSERT && row.getRowKind() != RowKind.DELETE
&& row.getRowKind() != RowKind.UPDATE_BEFORE) {
throw new IllegalArgumentException("unsupported RowKind: " + row.getRowKind());
} Prevention
- Route CDC streams through a transform that converts UPDATE_AFTER to INSERT (upsert).
- Enable upsert/delete handling on the source so only INSERT/DELETE/UPDATE_BEFORE reach the sink.
- Check RowKind support before connecting a new source to the Typesense sink.
When it happens
Trigger: The sink is connected to a changelog data stream whose RowKinds include UPDATE_AFTER (or others) without a transform/upsert configuration that converts them to supported kinds; or a custom producer emits unsupported RowKinds.
Common situations: CDC pipelines (MySQL CDC etc.) wired directly into the Typesense sink where update events emit UPDATE_BEFORE/UPDATE_AFTER pairs and UPDATE_AFTER is not handled; wrongly configured sink 'schema-save-mode' or upsert settings.
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
- UNSUPPORTED_ROW_KIND
- Unsupported row kind.
- Unsupported rowKind: " + rowKind
- UNSUPPORTED_ROW_KIND
- UNSUPPORTED_OPERATION
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/d18d0fafd115dca2.
Report an issue: GitHub.