{"record":{"id":"54e5ef24463a5d69","repo":"apache/seatunnel","slug":"failed-commit-file-to-clickhouse","errorCode":null,"errorMessage":"failed commit file to clickhouse","messagePattern":"failed commit file to clickhouse","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/ClickhouseFileSinkAggCommitter.java","lineNumber":76,"sourceCode":"                proxy.getClickhouseTable(\n                        proxy.getClickhouseConnection(),\n                        fileReaderOption.getShardMetadata().getDatabase(),\n                        fileReaderOption.getShardMetadata().getTable());\n    }\n\n    @Override\n    public List<CKFileAggCommitInfo> commit(List<CKFileAggCommitInfo> aggregatedCommitInfo)\n            throws IOException {\n        aggregatedCommitInfo.forEach(\n                commitInfo ->\n                        commitInfo\n                                .getDetachedFiles()\n                                .forEach(\n                                        (shard, files) -> {\n                                            try {\n                                                this.attachFileToClickhouse(shard, files);\n                                            } catch (ClickHouseException e) {\n                                                throw new SeaTunnelException(\n                                                        \"failed commit file to clickhouse\", e);\n                                            }\n                                        }));\n        return new ArrayList<>();\n    }\n\n    @Override\n    public CKFileAggCommitInfo combine(List<CKFileCommitInfo> commitInfos) {\n        Map<Shard, List<String>> files = new HashMap<>();\n        commitInfos.forEach(\n                infos ->\n                        infos.getDetachedFiles()\n                                .forEach(\n                                        (shard, file) -> {\n                                            if (files.containsKey(shard)) {\n                                                files.get(shard).addAll(file);\n                                            } else {\n                                                files.put(shard, file);","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/ClickhouseFileSinkAggCommitter.java#L58-L94","documentation":"The ClickHouse file sink aggregate committer attaches staged files to ClickHouse during commit; a ClickHouseException from the attach operation is wrapped in this generic SeaTunnelException, failing the commit. The staged files for that shard were not successfully committed to the table.","triggerScenarios":"attachFileToClickhouse throws ClickHouseException while committing detached files for a shard — e.g. schema/format mismatch of the staged files, permissions, disk space, or server error on the destination shard; raised in ClickhouseFileSinkAggCommitter.commit.","commonSituations":"ClickHouse user lacks permission to attach files, target shard's table schema diverged from the staged file schema, disk full on the ClickHouse node, or transient server failures during commit.","solutions":["Inspect the wrapped ClickHouseException cause for the server-side attach failure reason","Verify the commit user has the privileges to attach files on each shard and that disk space is sufficient","Confirm the staged file schema matches the target table; fix schema drift and retry the commit"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify ATTACH/insert privileges and disk space on all shards before the run","Keep the staged file schema identical to the target table schema","Retry commit on transient ClickHouse server errors"],"tags":["clickhouse","file-commit","committer","attach-file"],"backgroundTag":"http-error-response","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"}