{"record":{"id":"d18d0fafd115dca2","repo":"apache/seatunnel","slug":"unsupported-operation-d18d0f","errorCode":"UNSUPPORTED_OPERATION","errorMessage":"Unsupported write row kind: ","messagePattern":"Unsupported write row kind: ","errorType":"error_code","errorClass":"TypesenseConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/sink/TypesenseSinkWriter.java","lineNumber":104,"sourceCode":"            return;\n        }\n\n        switch (element.getRowKind()) {\n            case INSERT:\n            case UPDATE_AFTER:\n                String indexRequestRow = seaTunnelRowSerializer.serializeRow(element);\n                requestEsList.add(indexRequestRow);\n                if (requestEsList.size() >= maxBatchSize) {\n                    insert(collection, requestEsList);\n                }\n                break;\n            case UPDATE_BEFORE:\n            case DELETE:\n                String id = seaTunnelRowSerializer.serializeRowForDelete(element);\n                typesenseClient.deleteCollectionData(collection, id);\n                break;\n            default:\n                throw new TypesenseConnectorException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,\n                        \"Unsupported write row kind: \" + element.getRowKind());\n        }\n    }\n\n    @Override\n    public Optional<TypesenseCommitInfo> prepareCommit() {\n        insert(this.collection, this.requestEsList);\n        return Optional.empty();\n    }\n\n    private void insert(String collection, List<String> requestEsList) {\n        try {\n            RetryUtils.retryWithException(\n                    () -> {\n                        typesenseClient.insert(collection, requestEsList);\n                        return null;\n                    },","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/sink/TypesenseSinkWriter.java#L86-L122","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nstream that emits UPDATE_AFTER rows -> Typesense sink\n// after\nsource(CDC, emit-upsert-as-delete-and-insert=true) -> Typesense sink\n// or in code:\ncase UPDATE_AFTER:\n    upsertDocument(element);\n    break;","handlingStrategy":"validation","validationCode":"// ensure changelog kinds are limited to supported ones before the sink\nif (row.getRowKind() != RowKind.INSERT && row.getRowKind() != RowKind.DELETE\n        && row.getRowKind() != RowKind.UPDATE_BEFORE) {\n    throw new IllegalArgumentException(\"unsupported RowKind: \" + row.getRowKind());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["typesense","sink","rowkind","cdc"],"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"}