{"record":{"id":"374aac2e165ab112","repo":"apache/seatunnel","slug":"reader-is-not-registered-pending-splits-are-374aac","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-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/source/enumerator/AbstractSplitEnumerator.java","lineNumber":140,"sourceCode":"                                                            context.currentParallelism()),\n                                                    r -> new ArrayList<>())\n                                            .add(split));\n        }\n    }\n\n    @Override\n    public void open() {\n        log.info(\"Open split enumerator.\");\n    }\n\n    @Override\n    public void addSplitsBack(List<IcebergFileScanTaskSplit> splits, int subtaskId) {\n        if (!splits.isEmpty()) {\n            addPendingSplits(splits);\n            if (context.registeredReaders().contains(subtaskId)) {\n                assignPendingSplits(Collections.singleton(subtaskId));\n            } else {\n                log.warn(\n                        \"Reader {} is not registered. Pending splits {} are not assigned.\",\n                        subtaskId,\n                        splits);\n            }\n        }\n        log.info(\"Add back splits {} to JdbcSourceSplitEnumerator.\", splits.size());\n    }\n\n    @Override\n    public int currentUnassignedSplitSize() {\n        if (!pendingTables.isEmpty()) {\n            return pendingTables.size();\n        }\n        if (!pendingSplits.isEmpty()) {\n            return pendingSplits.values().stream().mapToInt(List::size).sum();\n        }\n        return 0;\n    }","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/source/enumerator/AbstractSplitEnumerator.java#L122-L158","documentation":"In AbstractSplitEnumerator.addSplitsBack, splits returned by a failed reader are re-queued as pending, but if that subtask's reader is not yet registered with the SourceReaderContext, the enumerator cannot assign to it and logs this warning. The splits remain pending and will be assigned once the reader registers (or on the next assignment round). It is a race-condition guard for failover/restart, not a fatal error.","triggerScenarios":"Reader failover or job restore: addSplitsBack(subtaskId) is called for a reader that hasn't (re)registered with the SourceSplitCoordinator yet (registeredReaders() doesn't contain subtaskId).","commonSituations":"Worker node failure during Iceberg source execution; checkpoint restore where the enumerator recovers splits before the new reader registers; slow reader startup after rescale.","solutions":["No action usually needed — splits are kept pending and assigned after the reader registers","Check that the source's reader registration/lifecycle is intact (start() called, context registration reaches coordinator)","If splits stay unassigned, restart the job and verify reader registration in logs","Ensure SourceReaderContext sends RegisterReader event before first split request in custom source code"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Accept the pending-splits fallback as normal failover behavior","Monitor logs to confirm readers re-register and pending splits are drained","Keep cluster resources stable to minimize reader failovers","Verify checkpoint restore completes before stressing the source"],"tags":["iceberg","source","split-assignment","reader-registration"],"backgroundTag":"invalid-state-transition","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"}