{"record":{"id":"6a1964e183e652d8","repo":"apache/seatunnel","slug":"reader-is-not-registered-pending-splits-are-6a1964","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-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/split/ClickhouseSourceSplitEnumerator.java","lineNumber":128,"sourceCode":"                }\n            }\n        }\n\n        LOG.info(\"No more splits to assign.\" + \" Sending NoMoreSplitsEvent to reader {}.\", readers);\n        readers.forEach(context::signalNoMoreSplits);\n    }\n\n    @Override\n    public void close() throws IOException {}\n\n    @Override\n    public void addSplitsBack(List<ClickhouseSourceSplit> splits, int subtaskId) {\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        LOG.info(\"Add back splits {} to JdbcSourceSplitEnumerator.\", splits.size());\n    }\n\n    @Override\n    public int currentUnassignedSplitSize() {\n        return this.pendingSplit.size();\n    }\n\n    @Override\n    public void handleSplitRequest(int subtaskId) {\n        throw new ClickhouseConnectorException(\n                CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,\n                String.format(\"Unsupported handleSplitRequest: %d\", subtaskId));","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/split/ClickhouseSourceSplitEnumerator.java#L110-L146","documentation":"The ClickHouse split enumerator's addSplitsBack re-queues splits returned by a reader. If subtaskId is not in context.registeredReaders(), the splits are stored as pending but not assigned, and this warning is logged. They will be assigned once the reader re-registers.","triggerScenarios":"A ClickHouse source reader fails or is deregistered and its addSplitsBack callback reaches the enumerator before the reader has re-registered (typical after task failure/restart).","commonSituations":"Worker crash/failover; checkpoint restore racing with split return; slow reader reconnection exceeding registration timeout.","solutions":["Usually no action: pending splits are assigned on registerReader.","If splits remain stuck, restart the job from the latest checkpoint to realign enumerator and reader state.","Investigate why the reader was unregistered (check TaskManager/worker logs for the reader failure)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep checkpointing enabled for consistent failover","Monitor pending-split backlog metrics","Diagnose reader crashes promptly to shorten unregistered windows"],"tags":["clickhouse","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-14T11:17:12.474Z"}