{"record":{"id":"f31bf0d9bf482e0a","repo":"apache/seatunnel","slug":"table-pre-commit-failed","errorCode":"TABLE_PRE_COMMIT_FAILED","errorMessage":"Paimon pre-commit failed.","messagePattern":"Paimon pre-commit failed\\.","errorType":"error_code","errorClass":"PaimonConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java","lineNumber":320,"sourceCode":"    @Override\n    public Optional<PaimonCommitInfo> prepareCommit() throws IOException {\n        return Optional.empty();\n    }\n\n    @Override\n    public Optional<PaimonCommitInfo> prepareCommit(long checkpointId) throws IOException {\n        try {\n            List<CommitMessage> fileCommittables =\n                    ((StreamTableWrite) tableWrite).prepareCommit(waitCompaction(), checkpointId);\n            committables.addAll(fileCommittables);\n            if (!bucketAssigners.isEmpty()) {\n                List<PaimonBucketAssigner> assigners = new ArrayList<>(bucketAssigners);\n                bucketAssigners.clear();\n                assigners.forEach(assigner -> assigner.prepareCommit(checkpointId));\n            }\n            return Optional.of(new PaimonCommitInfo(fileCommittables, checkpointId, commitUser));\n        } catch (Exception e) {\n            throw new PaimonConnectorException(\n                    PaimonConnectorErrorCode.TABLE_PRE_COMMIT_FAILED,\n                    \"Paimon pre-commit failed.\",\n                    e);\n        }\n    }\n\n    @Override\n    public List<PaimonSinkState> snapshotState(long checkpointId) throws IOException {\n        PaimonSinkState paimonSinkState =\n                new PaimonSinkState(new ArrayList<>(committables), commitUser, checkpointId);\n        committables.clear();\n        return Collections.singletonList(paimonSinkState);\n    }\n\n    @Override\n    public void abortPrepare() {}\n\n    @Override","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java#L302-L338","documentation":"PaimonSinkWriter.prepareCommit wraps any exception occurring while flushing writers, bucket assigners, or preparing Paimon committables during checkpoint into TABLE_PRE_COMMIT_FAILED with the fixed message \"Paimon pre-commit failed.\". The real cause is always in the wrapped exception.","triggerScenarios":"prepareCommit() is invoked at checkpoint/normal pre-commit and any underlying operation throws: file IO failure on data files, bucket assigner snapshot failure, committable serialization, or manifest writes.","commonSituations":"HDFS/S3 outage or quota exceeded at checkpoint time; disk pressure on TaskManager/worker; checkpoint timeouts under load; corrupted in-progress Paimon data files.","solutions":["Inspect the cause exception in the logs for the root IO/commit failure","Check storage (HDFS/S3) health, quota, and connectivity from worker nodes","Retry the failed checkpoint / restart from the last completed checkpoint (Paimon commits are transactional)","Increase checkpoint timeout and tune writer buffer settings if timeouts are the trigger"],"exampleFix":"null","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { writer.prepareCommit(checkpointId); } catch (PaimonConnectorException e) { if (PaimonConnectorErrorCode.TABLE_PRE_COMMIT_FAILED.equals(e.getErrorCode())) { log.error(\"Paimon pre-commit failed; cause:\", e.getCause()); /* rely on checkpoint restart / retry once */ } else { throw e; } }","preventionTips":["Monitor storage health/quotas for HDFS/S3","Tune checkpoint timeout and writer buffers","Alert on worker disk pressure before checkpoints"],"tags":["paimon","sink","checkpoint"],"backgroundTag":"database-write-failed","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"}