{"record":{"id":"f2a412afa64a6971","repo":"apache/seatunnel","slug":"unsupported-pending-split-list-value-type-pendin","errorCode":null,"errorMessage":"Unsupported pending split list value type ${pendingSplit == null ? \"null\" : pendingSplit.getClass().getName()}.","messagePattern":"Unsupported pending split list value type (.+?)\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-tidb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/tidb/source/enumerator/TiDBSourceCheckpointState.java","lineNumber":94,"sourceCode":"            } else if (value instanceof List) {\n                normalizedPendingSplit.put(entry.getKey(), copyPendingSplits((List<?>) value));\n            } else if (value == null) {\n                normalizedPendingSplit.put(entry.getKey(), new ArrayList<>());\n            } else {\n                throw new IllegalArgumentException(\n                        String.format(\n                                \"Unsupported pending split value type %s for reader %s.\",\n                                value.getClass().getName(), entry.getKey()));\n            }\n        }\n        return normalizedPendingSplit;\n    }\n\n    private static List<TiDBSourceSplit> copyPendingSplits(List<?> pendingSplits) {\n        List<TiDBSourceSplit> copiedPendingSplits = new ArrayList<>();\n        for (Object pendingSplit : pendingSplits) {\n            if (!(pendingSplit instanceof TiDBSourceSplit)) {\n                throw new IllegalArgumentException(\n                        String.format(\n                                \"Unsupported pending split list value type %s.\",\n                                pendingSplit == null ? \"null\" : pendingSplit.getClass().getName()));\n            }\n            copiedPendingSplits.add((TiDBSourceSplit) pendingSplit);\n        }\n        return copiedPendingSplits;\n    }\n}\n","sourceCodeStart":76,"sourceCodeEnd":104,"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/enumerator/TiDBSourceCheckpointState.java#L76-L104","documentation":"Thrown by copyPendingSplits when an element inside a pending-splits list from checkpoint state is not a TiDBSourceSplit instance (or is null). The restore code defensively copies the list and enforces element type so later split assignment cannot fail with ClassCastException.","triggerScenarios":"Restoring a checkpoint whose pendingSplits list contains null or non-TiDBSourceSplit elements — typically from a state file written by a different connector version or hand-edited state.","commonSituations":"Version-skewed checkpoint restore; state corruption; mixing split objects from other CDC connectors (e.g. MySQL splits) into a TiDB job state.","solutions":["Restart from a fresh checkpoint/savepoint compatible with the current connector version","Remove or fix the invalid element in the checkpoint state for the affected reader","Verify no other connector's split objects are being serialized into this job's state","Regenerate pending splits by starting the job without restore state"],"exampleFix":"// before: list contains null element\n[{\"splitId\":\"tidb-1\"}, null]\n// after: only TiDBSourceSplit elements\n[{\"splitId\":\"tidb-1\"}, {\"splitId\":\"tidb-2\"}]","handlingStrategy":"validation","validationCode":"// Validate list elements before passing to restore\nboolean valid = pendingSplits.stream()\n    .allMatch(s -> s instanceof TiDBSourceSplit);\nif (!valid) throw new IllegalStateException(\"pendingSplits contains non-TiDBSourceSplit elements\");","typeGuard":"static boolean allSplitsTyped(List<?> pendingSplits) {\n    return pendingSplits != null\n        && pendingSplits.stream().allMatch(s -> s instanceof TiDBSourceSplit);\n}","tryCatchPattern":"try {\n    state = TiDBSourceCheckpointState.fromCheckpoint(rawState);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unsupported pending split list value type\")) {\n        LOG.error(\"Checkpoint state has foreign/null split elements; discard and restart\");\n    }\n    throw e;\n}","preventionTips":["Keep one connector's split objects out of another connector's state","Regenerate state files after connector upgrades","Serialize and deserialize splits only through the connector's own serializer"],"tags":["cdc","tidb","checkpoint","state-restore","type-mismatch"],"backgroundTag":"type-mismatch","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"}