{"record":{"id":"de9e23d274f5dd61","repo":"apache/seatunnel","slug":"reader-is-not-registered-pending-splits-are","errorCode":null,"errorMessage":"Reader {} is not registered. Pending splits {} are not assigned.","messagePattern":"Reader (.+?) is not registered\\. Pending splits (.+?) are not assigned\\.","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/enumerator/TiDBSourceSplitEnumerator.java","lineNumber":208,"sourceCode":"        }\n    }\n\n    /**\n     * Add a split back to the split enumerator. It will only happen when a {@link SourceReader}\n     * fails and there are splits assigned to it after the last successful checkpoint.\n     *\n     * @param splits The split to add back to the enumerator for reassignment.\n     * @param subtaskId The id of the subtask to which the returned splits belong.\n     */\n    @Override\n    public void addSplitsBack(List<TiDBSourceSplit> splits, int subtaskId) {\n        log.debug(\"Add back splits {} to TiDBSourceSplitEnumerator.\", splits);\n        if (!splits.isEmpty()) {\n            addPendingSplit(splits, subtaskId);\n            if (context.registeredReaders().contains(subtaskId)) {\n                assignSplit(Collections.singletonList(subtaskId));\n            } else {\n                log.warn(\n                        \"Reader {} is not registered. Pending splits {} are not assigned.\",\n                        subtaskId,\n                        splits);\n            }\n        }\n    }\n\n    @Override\n    public int currentUnassignedSplitSize() {\n        return pendingSplit.values().stream().mapToInt(List::size).sum();\n    }\n\n    @Override\n    public void handleSplitRequest(int subtaskId) {}\n\n    @Override\n    public void registerReader(int subtaskId) {\n        log.debug(\"Register reader {} to TiDBSourceSplitEnumerator.\", subtaskId);","sourceCodeStart":190,"sourceCodeEnd":226,"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/TiDBSourceSplitEnumerator.java#L190-L226","documentation":"When the TiDB CDC split enumerator receives splits back from a failed/restarted reader via addSplitsBack, it queues them as pending for that subtask. If the subtask is not in context.registeredReaders() (reader crashed and has not re-registered yet), the pending splits are held but not assigned, and this warning is logged. Assignment will happen when the reader re-registers.","triggerScenarios":"Reader failure/restore causing SourceReader to send back splits (addSplitsBack) while its subtaskId is no longer in the enumerator's registered reader set.","commonSituations":"Worker crash or checkpoint restore racing with split return; reader failing health checks and being deregistered before addSplitsBack arrives.","solutions":["No action usually needed: splits stay pending and are reassigned when the reader re-registers (registerReader triggers assignment).","If splits stay unassigned, restart the job from the last checkpoint so reader registration and split state are consistent.","Check reader failure logs for the root cause of the reader loss (network, OOM)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Rely on re-registration: pending splits are reassigned automatically when the reader reconnects","Monitor job metrics for stuck pending-split counts","Keep checkpointing enabled so failover restores consistent enumerator/reader state"],"tags":["cdc","split-assignment","reader-registration","recovery"],"backgroundTag":"reader-not-registered","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}