[
https://issues.apache.org/jira/browse/FLINK-41135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-41135:
-----------------------------------
Labels: pull-request-available (was: )
> Exactly-once JdbcSink fails with "currentXid not null" after the end of input
> -----------------------------------------------------------------------------
>
> Key: FLINK-41135
> URL: https://issues.apache.org/jira/browse/FLINK-41135
> Project: Flink
> Issue Type: Bug
> Components: Connectors / JDBC
> Affects Versions: jdbc-3.2.0, jdbc-3.3.0, jdbc-4.0.0, jdbc-4.1.0,
> jdbc-3.4.0
> Reporter: Martijn Visser
> Assignee: Martijn Visser
> Priority: Major
> Labels: pull-request-available
> Fix For: jdbc-5.0.0
>
>
> After the end of input, {{JdbcWriter.snapshotState()}} still calls
> {{createTx}} for every checkpoint the task takes part in, while
> {{prepareCommit()}} is no longer called. The first such snapshot opens an
> empty transaction, and a second one fails with {{IllegalStateException:
> currentXid not null}}, so the task fails and the job fails over. Flink sends
> more than one checkpoint after the end of input when the first one fails or
> expires, or when a trigger is already queued. Reproduced on main, 2.1.3 to
> 2.3.0, by letting the first checkpoint after the end of input expire. The
> writer should not start a transaction after the end of input.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)