{"record":{"id":"45b09df34d4c7954","repo":"apache/seatunnel","slug":"unsupported-row-kind","errorCode":"UNSUPPORTED_ROW_KIND","errorMessage":"RowKind.DELETE is not supported by the Couchbase sink. CDC delete handling is out of scope for the initial implementation.","messagePattern":"RowKind\\.DELETE is not supported by the Couchbase sink\\. CDC delete handling is out of scope for the initial implementation\\.","errorType":"error_code","errorClass":"CouchbaseConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-couchbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/couchbase/sink/CouchbaseWriter.java","lineNumber":169,"sourceCode":"     * because CDC delete support is out of scope for this initial implementation.\n     *\n     * <p>The row's document id is assigned here, at buffer-add time, so that every subsequent flush\n     * attempt (including a {@link #close}-triggered re-flush of a buffer that a prior flush left\n     * un-cleared) uses the same stable id. This prevents silent duplicate documents when no primary\n     * key is configured (UUID path) and prevents spurious {@link\n     * com.couchbase.client.core.error.DocumentExistsException} collisions on already-committed rows\n     * when a primary key is configured and insert mode is active.\n     *\n     * @param row the incoming row throws the CouchBaseConnectorException if the row kind is {@code\n     *     DELETE}\n     */\n    @Override\n    public void write(SeaTunnelRow row) {\n        if (row.getRowKind() == RowKind.UPDATE_BEFORE) {\n            return;\n        }\n        if (row.getRowKind() == RowKind.DELETE) {\n            throw new CouchbaseConnectorException(\n                    CouchbaseConnectorErrorCode.UNSUPPORTED_ROW_KIND,\n                    \"RowKind.DELETE is not supported by the Couchbase sink. \"\n                            + \"CDC delete handling is out of scope for the initial implementation.\");\n        }\n        // Assign the document id at buffer-add time (not inside doFlush) so that if close()\n        // triggers a second doFlush() on a not-yet-cleared buffer the same ids are reused.\n        JsonObject doc = toJsonObject(row);\n        WriteUnit unit = new WriteUnit(buildDocumentKey(doc), doc);\n        synchronized (this) {\n            buffer.add(unit);\n            if (isOverMaxBatchSizeLimit()) {\n                doFlush();\n            }\n        }\n    }\n\n    @Override\n    public Optional<Void> prepareCommit() {","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-couchbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/couchbase/sink/CouchbaseWriter.java#L151-L187","documentation":"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.","triggerScenarios":"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.","commonSituations":"CDC pipelines replicating deletes; jobs where an upstream transform emits delete rows (e.g. filter or dedup transforms configured to emit deletes).","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"],"exampleFix":"// before\ntransform {\n  Sql { source_table_name = \"cdc\"; result_table_name = \"out\"; query = \"select * from cdc\" }\n}\n// after\ntransform {\n  Sql { source_table_name = \"cdc\"; result_table_name = \"out\"; query = \"select * from cdc where __op <> 'DELETE'\" }\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"java\nif (row.getRowKind() == RowKind.DELETE) { /* skip or route elsewhere */ }","tryCatchPattern":"java\ntry {\n    writer.write(row);\n} catch (CouchbaseConnectorException e) {\n    if (\"UNSUPPORTED_ROW_KIND\".equals(e.getErrorCode().name())) {\n        // filter DELETE rows upstream and resubmit\n    }\n}","preventionTips":["Filter DELETE RowKind rows before the Couchbase sink when using CDC sources","Check source CDC delete propagation options and disable them"],"tags":["cdc","rowkind","unsupported"],"backgroundTag":"unsupported-operation","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"}