DanielLeens commented on issue #13341:
URL: https://github.com/apache/seatunnel/issues/13341#issuecomment-7008670285

   Classification: F / Connector-V2 JDBC row-error transaction semantics.
   
   I checked current `dev` at `1d0e6509a0aba3e34219a1a7ae370913f0150b2a`. 
`JdbcSinkWriter.handleRowLevelBatchFailure()` currently reports every row in 
the pending batch to the row-error collector, clears the batch, and then rolls 
back when auto-commit is disabled. So the reported 3-valid-plus-1-duplicate 
outcome is a real contract gap; it is not solved merely by the merged 
error-bypass foundation in #10306.
   
   A focused follow-up PR is welcome, but replay must be separated by 
transaction mode. For `auto_commit = false`, establish exactly what the 
driver/database guarantees after the failed batch and after the rollback or 
savepoint rollback, then replay only rows that are known not to have been 
committed. For auto-commit mode, do not replay until idempotence and 
partial-apply behavior are proved for the supported driver path; otherwise 
valid rows can be written twice while still being reported as errors.
   
   Please start with a deterministic regression using one valid row, one 
constraint-violating row, and another valid row in one batch. It should assert 
exact target rows, exact error rows, transaction/savepoint outcome, and 
unchanged behavior when no `error_handler` is configured. Keep any 
documentation correction in the same PR, and leave a separately demonstrated 
auto-commit contract for a later focused change if it cannot meet the same 
guarantees.


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