{"record":{"id":"a828a7c8d8c0121e","repo":"apache/seatunnel","slug":"unsupported-row-type","errorCode":null,"errorMessage":"Unsupported row type:","messagePattern":"Unsupported row type:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-tidb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/tidb/source/reader/TiDBSourceReader.java","lineNumber":385,"sourceCode":"            return false;\n        }\n        log.debug(\"binlog record, type: {}, data: {}\", row.getType(), row);\n        switch (row.getType()) {\n            case COMMITTED:\n                preWrites.put(RowKeyWithTs.ofStart(row), row);\n                commits.put(RowKeyWithTs.ofCommit(row), row);\n                break;\n            case COMMIT:\n                commits.put(RowKeyWithTs.ofCommit(row), row);\n                break;\n            case PREWRITE:\n                preWrites.put(RowKeyWithTs.ofStart(row), row);\n                break;\n            case ROLLBACK:\n                preWrites.remove(RowKeyWithTs.ofStart(row));\n                break;\n            default:\n                log.warn(\"Unsupported row type:\" + row.getType());\n        }\n        return true;\n    }\n\n    protected void flushRows(final long resolvedTs) throws Exception {\n        flushRowsAndGetSafeResolvedTs(resolvedTs);\n    }\n\n    private long flushRowsAndGetSafeResolvedTs(final long resolvedTs) throws Exception {\n        long safeResolvedTs = resolvedTs;\n        while (!commits.isEmpty() && commits.firstKey().getTimestamp() <= resolvedTs) {\n            final RowKeyWithTs commitKey = commits.firstKey();\n            final Cdcpb.Event.Row commitRow = commits.firstEntry().getValue();\n            final Cdcpb.Event.Row prewriteRow = preWrites.remove(RowKeyWithTs.ofStart(commitRow));\n            if (prewriteRow == null) {\n                safeResolvedTs = Math.min(safeResolvedTs, commitKey.getTimestamp() - 1);\n                log.warn(\n                        \"Commit row has no matched prewrite row yet, hold it and stop advancing resolvedTs. \"","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-tidb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/tidb/source/reader/TiDBSourceReader.java#L367-L403","documentation":"While consuming TiKV CDC streaming events, TiDBSourceReader.handleRow only handles specific row event types (e.g. PREWRITE, COMMIT, ROLLBACK in the prewrite handling switch). An event row of an unrecognized type falls into the default branch and this warning is logged; the row is skipped but streaming continues (returns true).","triggerScenarios":"A Cdcpb.Event.Row arrives whose getType() is not one of the types handled by the switch (e.g. newer TiKV event types or marker/unknown types).","commonSituations":"Connecting to a newer TiDB/TiKV version that emits event types this connector version does not know about; unusual raft/txn event propagation during region merges.","solutions":["Verify TiDB/TiKV cluster version compatibility with the connector version; upgrade the seatunnel connector-cdc-tidb plugin if the cluster is newer.","Inspect the logged row type; if it corresponds to a known TiKV event type that should be handled, file/apply a patch adding that case.","No immediate action required — the event is skipped, but monitor for data loss if the type is significant."],"exampleFix":"// before\ndefault:\n    log.warn(\"Unsupported row type:\" + row.getType());\n// after\ncase TYPE_UNKNOWN:\ncase INT_EVENT:\n    // ignore non-data events\n    break;\ndefault:\n    log.warn(\"Unsupported row type:\" + row.getType());","handlingStrategy":"fallback","validationCode":"// verify cluster/connector compatibility before running\n// ensure TiDB/TiKV version is within the connector's supported matrix","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin TiDB/TiKV versions supported by your connector-cdc-tidb version","Upgrade the connector when upgrading the TiDB cluster","Watch for repeated warnings indicating systematically dropped event types"],"tags":["cdc","tidb","tikv","cdc-event"],"backgroundTag":"unsupported-enum-value","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"}