DanielLeens commented on issue #12419: URL: https://github.com/apache/seatunnel/issues/12419#issuecomment-5760330454
Classification: E / Connector-V2 JDBC source cancellation. Current `dev` confirms the gap. `JdbcSourceReader.close()` reaches `JdbcInputFormat.closeInputFormat()`, and `JdbcInputFormat` retains the active `PreparedStatement`; however, cleanup only closes the `ResultSet` and `Statement`. It never calls `Statement.cancel()`. If `executeQuery()` or `ResultSet.next()` is blocked, the close path can remain blocked behind the driver operation instead of actively asking the driver to stop it. I found no open PR for this path. A focused connector PR is appropriate, but please keep it independent of database-specific timeout defaults and do not add a new configuration option. It should safely publish/cancel the active statement before normal resource closure, tolerate drivers that reject or ignore `cancel()`, and preserve the existing transaction-cleanup order. Add a deterministic unit test for cancel-before-close and an integration regression using a supported driver with a deliberately in-flight query, asserting cancellation completion and resource cleanup. Please link the PR here first to keep one implementation path. -- 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]
