MartijnVisser opened a new pull request, #276:
URL: https://github.com/apache/flink-connector-jdbc/pull/276

   ## What is the purpose of the change
   
   A BATCH committer that restarts mid-commit fails on every attempt, see 
FLINK-41136. This builds on #259 (FLINK-41060); only the last commit belongs 
here.
   
   ## Brief change log
   
   - `JdbcSink` records at translation whether the committer commits at the end 
of input in BATCH mode
   - After a restart in that mode, `JdbcCommitter` skips a transaction the 
database doesn't know. It can't tell one it committed from one the database 
lost, so it skips those too
   - Explicit STREAMING mode keeps failing on an unknown transaction after a 
restart, as the restart re-runs the writers
   - AUTOMATIC mode without checkpointing is treated as BATCH, also when an 
unbounded source makes it run as STREAMING
   - AUTOMATIC mode with checkpointing that runs as BATCH isn't detected, see 
the docs
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - `ExactlyOnceJdbcSinkTest#testCommitterRestartInBatchMode` fails one commit 
so the committer restarts, in BATCH mode and in AUTOMATIC mode without 
checkpointing; on #259 the test fails with `XAER_NOTA`
   - `JdbcCommitterTest` covers the skip, also of a lost transaction, and the 
failure before a first restart and after a restart in STREAMING mode or in 
AUTOMATIC mode with checkpointing
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: yes
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): no
   - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: yes
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


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