davidzollo commented on PR #10459:
URL: https://github.com/apache/seatunnel/pull/10459#issuecomment-3981886794
## Blocking issue
- In `JdbcExactlyOnceSinkWriter`, `rollbackPrepareXidQuietly()` only logs a
warning and clears `prepareXid` if rollback fails
(`seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcExactlyOnceSinkWriter.java:288-300`).
- Also, `tryOpen()` triggers `recoverAndRollback(...)` only when
`recoverStates` is non-empty
(`.../JdbcExactlyOnceSinkWriter.java:133-137`).
### Risk
In the double-failure path:
`prepare succeeds -> begin next tx fails -> rollback prepared tx also fails`
a prepared XA transaction may be left behind, and recovery may not always
clean it up, which can violate the exactly-once boundary in edge cases.
### Suggested fix
1. Do not silently swallow rollback failure in this path; propagate with
full context (or attach as suppressed).
2. Add a dedicated unit test for “rollback of prepared xid fails” and verify
recovery behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]