{"record":{"id":"cb64887e220301ec","repo":"apache/seatunnel","slug":"failed-to-commit-transactions-out-of-keep-t","errorCode":null,"errorMessage":"failed to commit {} transactions out of {} (keep them to retry later)","messagePattern":"failed to commit (.+?) transactions out of (.+?) \\(keep them to retry later\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/xa/XaGroupOpsImpl.java","lineNumber":77,"sourceCode":"            try {\n                LOG.info(\"committing {} transaction\", x.getXid());\n                xaFacade.commit(x.getXid(), false);\n                result.succeeded(x);\n            } catch (XaFacade.TransientXaException e) {\n                result.failedTransiently(x.withAttemptsIncremented(), e);\n            } catch (Exception e) {\n                result.failed(x, e);\n            }\n        }\n        result.getForRetry().addAll(xids);\n        // A permanent or unknown commit failure must fail the checkpoint instead of being reported\n        // as a successful commit.\n        result.throwIfAnyFailed(\"commit\");\n        throwIfAnyReachedMaxAttempts(result, maxCommitAttempts);\n        result.getTransientFailure()\n                .ifPresent(\n                        f ->\n                                LOG.warn(\n                                        \"failed to commit {} transactions out of {} (keep them to retry later)\",\n                                        result.getForRetry().size(),\n                                        origSize,\n                                        f));\n        return result;\n    }\n\n    @Override\n    public void rollback(List<XidInfo> xids) {\n        for (XidInfo x : xids) {\n            xaFacade.rollback(x.getXid());\n        }\n    }\n\n    @Override\n    public GroupXaOperationResult<XidInfo> failAndRollback(Collection<XidInfo> xids) {\n        GroupXaOperationResult<XidInfo> result = new GroupXaOperationResult<>();\n        if (xids.isEmpty()) {","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/xa/XaGroupOpsImpl.java#L59-L95","documentation":"A WARN log in XaGroupOpsImpl.commit(). After committing all prepared XA transactions, if some failed transiently (below max commit attempts), they are kept for later retry and this warning reports how many failed out of the original count, together with the transient failure. The commit phase is not considered failed because those transactions will be retried (commit retry on recovery).","triggerScenarios":"commit() runs XaGroupOps over prepared transactions; one or more commits throw TransientXaException (network blip, lock timeout, temporary DB unavailability); result.getForRetry() is non-empty and a transient failure exists while under maxCommitAttempts.","commonSituations":"Short network interruptions or DB failover exactly at checkpoint complete; lock contention at commit time; DB connection pool exhaustion during notifyCheckpointComplete.","solutions":["Nothing to fix if retries succeed — recovery will re-commit retained transactions; monitor for repeated occurrences","Increase commit retry attempts/maxCommitAttempts for flaky networks","Check DB availability and lock contention at commit time","Ensure checkpoint recovery (XA recover) is functioning so retained xids are committed on restart"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm DB reachable before checkpoint-complete commit phase\ntry (Connection c = dataSource.getConnection()) {\n    if (!c.isValid(3)) throw new IllegalStateException(\"DB unhealthy before commit phase\");\n}","typeGuard":null,"tryCatchPattern":"// Transient commit failures are retried by the framework; in user code:\ntry {\n    commitAll(prepared);\n} catch (TransientXaException e) {\n    LOG.warn(\"commit failed transiently, will retry on recovery\", e);\n}","preventionTips":["Configure sufficient commit retry attempts for flaky networks","Reduce lock contention on sink tables at commit time","Monitor this WARN frequency — repeated occurrences indicate unstable DB connectivity","Ensure job recovery is enabled so retained xids get re-committed"],"tags":["jdbc","xa","commit","retry"],"backgroundTag":"request-timeout","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}