[
https://issues.apache.org/jira/browse/FLINK-40777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martijn Visser updated FLINK-40777:
-----------------------------------
Description:
SimpleXaConnectionProviderTest and TransactionIdConnectionTest are the only
tests that commit a prepared XA transaction from a new connection, which is
what the exactly-once committer and recovery rely on. Both run only on embedded
Derby. FLINK-40730 replaces Derby with H2, and H2 discards a prepared
transaction as soon as the connection that prepared it closes, so these tests
cannot move there.
This ticket makes them database-agnostic, runs them on PostgreSQL (the test
container already sets max_prepared_transactions), adds a recover() test, and
moves the XA_RDONLY case to a unit test: H2 never returns it, and the
PostgreSQL driver returns it only for read-only connections, which the
connector never opens.
was:
SimpleXaConnectionProviderTest and TransactionIdConnectionTest are the only
tests that commit a prepared XA transaction from a new connection, which is
what the exactly-once committer and recovery rely on. Both run only on embedded
Derby. FLINK-40730 replaces Derby with H2, and H2 discards a prepared
transaction as soon as the connection that prepared it closes, so these tests
cannot move there.
This ticket makes them database-agnostic, runs them on PostgreSQL (the test
container already sets max_prepared_transactions), adds a recover() test, and
moves the XA_RDONLY case to a unit test because neither PostgreSQL nor H2
returns it.
> Run the XA connection tests against PostgreSQL
> ----------------------------------------------
>
> Key: FLINK-40777
> URL: https://issues.apache.org/jira/browse/FLINK-40777
> Project: Flink
> Issue Type: Technical Debt
> Components: Connectors / JDBC
> Reporter: Martijn Visser
> Assignee: Martijn Visser
> Priority: Major
>
> SimpleXaConnectionProviderTest and TransactionIdConnectionTest are the only
> tests that commit a prepared XA transaction from a new connection, which is
> what the exactly-once committer and recovery rely on. Both run only on
> embedded Derby. FLINK-40730 replaces Derby with H2, and H2 discards a
> prepared transaction as soon as the connection that prepared it closes, so
> these tests cannot move there.
> This ticket makes them database-agnostic, runs them on PostgreSQL (the test
> container already sets max_prepared_transactions), adds a recover() test, and
> moves the XA_RDONLY case to a unit test: H2 never returns it, and the
> PostgreSQL driver returns it only for read-only connections, which the
> connector never opens.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)