Skip to content

[FLINK-39403][cdc-connector] Fix transaction leak during snapshot split read for DB2, Oracle, PostgreSQL, and SQL Server connectors#4364

Open
linguoxuan wants to merge 1 commit intoapache:masterfrom
linguoxuan:0407_lgx_2
Open

[FLINK-39403][cdc-connector] Fix transaction leak during snapshot split read for DB2, Oracle, PostgreSQL, and SQL Server connectors#4364
linguoxuan wants to merge 1 commit intoapache:masterfrom
linguoxuan:0407_lgx_2

Conversation

@linguoxuan
Copy link
Copy Markdown
Contributor

Purpose

During the snapshot split reading phase, initStatement() sets autoCommit to false on the JDBC
connection to enable cursor-based result set fetching. However, after the split read completes, the transaction is never committed and autoCommit is never restored to true. This may lead to idle transactions leak.

Change

Added a finally block in createDataEventsForTable() of Db2ScanFetchTask, OracleScanFetchTask, PostgresScanFetchTask, and SqlServerScanFetchTask to restore autoCommit to true after each snapshot split read.

…r DB2, Oracle, PostgreSQL, and SQL Server connectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant