DanielLeens commented on PR #12014:
URL: https://github.com/apache/seatunnel/pull/12014#issuecomment-5812689953

   Thanks @SEZ9 and @det101 — catching up on both of the last two messages 
before I post a fresh full pass on the current head.
   
   **F1 follow-up (docs + test pointer), verified fixed in `25baad9e3`:**
   - `docs/en/connectors/sink/Jdbc.md` and 
`docs/en/connectors/source/MySQL-CDC.md` (+ both `docs/zh` equivalents) now say 
explicitly that flush and `TRUNCATE` are not one transaction, that a post-flush 
`TRUNCATE` failure (FK constraint, missing privilege) leaves the flushed rows 
committed, and that restore replays those rows plus the pending `TRUNCATE` — so 
that window can produce duplicates. I read the diff directly; wording matches 
what was promised.
   - The XA rejection is exercised by 
`JdbcExactlyOnceSinkWriterTest.applyTableOperationIsRejectedOnXaWriter` 
(`JdbcExactlyOnceSinkWriter.java:166-179`), which asserts both the exception 
message and `verify(xaFacade, never()).endAndPrepare(any())`.
   
   **One correction on my side, @SEZ9 — you were right to push on this:** in my 
09-23 message I described the XA rejection as happening "at config-validation 
time." That's wrong, and I should have re-checked the actual call site instead 
of restating my own earlier wording. I just reread 
`JdbcExactlyOnceSinkWriter.applyTableOperation()` and `JdbcSinkFactory.java` 
directly: there is no job-submission-time check that cross-references 
`table-operations.enabled` (source-side) against `is_exactly_once` (sink-side) 
— the two are on different connectors, and `JdbcSinkFactory`'s own 
submission-time validator only covers `is_exactly_once=true` + `max_retries=0`. 
The rejection is a **runtime** `UnsupportedOperationException`, thrown the 
first time a `TRUNCATE` actually reaches the XA writer, not at config 
validation. Apologies for the imprecise wording — thanks for catching it.
   
   **F4** — agreed this is still open. I'll fold it into the fresh pass below 
rather than resolve it here.
   
   Posting a full re-review of the current head (`7926b4b342b`) now, since a 
fair amount has moved (several `dev`-merges plus the `25baad9e3` docs commit) 
since my last full pass.
   


-- 
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]

Reply via email to