{"record":{"id":"13e75dda56c7e076","repo":"apache/seatunnel","slug":"the-splitchange-type-of-s-is-not-supported","errorCode":null,"errorMessage":"The SplitChange type of %s is not supported.","messagePattern":"The SplitChange type of (.+?) is not supported\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/reader/IncrementalSourceSplitReader.java","lineNumber":122,"sourceCode":"                    currentFetcher != null ? currentFetcher.getClass().getSimpleName() : \"null\",\n                    currentFetcher != null && currentFetcher.isFinished());\n            throw new IOException(\n                    String.format(\n                            \"Invalid state: currentSplitId is null when emitting records. \"\n                                    + \"emittedFinishedSplitId=%s, currentFetcher=%s, isFinished=%s\",\n                            emittedFinishedSplitId,\n                            currentFetcher != null\n                                    ? currentFetcher.getClass().getSimpleName()\n                                    : \"null\",\n                            currentFetcher != null && currentFetcher.isFinished()));\n        }\n        return ChangeEventRecords.forRecords(currentSplitId, dataIt);\n    }\n\n    @Override\n    public void handleSplitsChanges(SplitsChange<SourceSplitBase> splitsChanges) {\n        if (!(splitsChanges instanceof SplitsAddition)) {\n            throw new UnsupportedOperationException(\n                    String.format(\n                            \"The SplitChange type of %s is not supported.\",\n                            splitsChanges.getClass()));\n        }\n\n        log.debug(\"Handling split change {}\", splitsChanges);\n        splits.addAll(splitsChanges.splits());\n    }\n\n    @Override\n    public void wakeUp() {}\n\n    @Override\n    public void close() throws Exception {\n        try {\n            if (currentFetcher != null) {\n                log.info(\"Close current fetcher {}\", currentFetcher.getClass().getCanonicalName());\n                currentFetcher.close();","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/reader/IncrementalSourceSplitReader.java#L104-L140","documentation":"handleSplitsChanges() only supports SplitsAddition — the CDC source reader never removes or modifies splits through this API. If the engine delivers any other SplitsChange subtype (e.g. SplitsRemoval), the reader throws UnsupportedOperationException because it cannot process it.","triggerScenarios":"handleSplitsChanges(splitsChanges) receives a SplitsChange that is not an instanceof SplitsAddition — e.g. the framework issues SplitsRemoval during failed/finishing-split handling or a custom engine path sends an unsupported change type.","commonSituations":"Running on an engine/translation layer that emits removal changes the CDC reader doesn't handle; job restore paths that replay removal events; custom SourceReader integration feeding the wrong change type.","solutions":["Check the engine version and connector compatibility; upgrade SeaTunnel so split-removal changes are not routed to this reader","Inspect why a non-addition SplitsChange was generated (usually a failed-split or recovery path) and restart from a clean checkpoint","If implementing a custom source/enumerator, only send SplitsAddition to IncrementalSourceSplitReader"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Filter change types before passing to the CDC reader:\nif (!(splitsChange instanceof SplitsAddition)) {\n    throw new IllegalArgumentException(\"IncrementalSourceSplitReader only accepts SplitsAddition\");\n}","typeGuard":"boolean isAddition(SplitsChange<?> c) { return c instanceof SplitsAddition; }","tryCatchPattern":"try { reader.handleSplitsChanges(change); }\ncatch (UnsupportedOperationException e) { LOG.warn(\"Ignoring unsupported split change type\", e); }","preventionTips":["Only route SplitsAddition to the incremental split reader","Verify engine/translation layer compatibility with the CDC connector version"],"tags":["cdc","unsupported-operation","split-reader"],"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"}