Make JDBC Connection.close() async by default with synchronous opt-in#513
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/Open-J-Proxy/ojp/sessions/92a7f387-1fcd-4559-bfeb-e98a497fd289 Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Open-J-Proxy/ojp/sessions/92a7f387-1fcd-4559-bfeb-e98a497fd289 Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
rrobetti
May 14, 2026 08:41
View session
|
Copilot AI
added a commit
that referenced
this pull request
May 14, 2026
DEFAULT_JDBC_CLOSE_SYNCHRONOUS flipped from false to true. The async-by-default introduced in PR #513 caused a race in Oracle tests (ORA-00955) because terminateSession ran in the background, leaving the previous session's table still locked when setUp tried to DROP+CREATE it. - CommonConstants: DEFAULT_JDBC_CLOSE_SYNCHRONOUS = true - ConnectionCloseBehaviorTest: tests updated to match synchronous default - docs (ojp-jdbc-configuration.md, part2-chapter5-jdbc-configuration.md): updated default value and prose accordingly Agent-Logs-Url: https://github.com/Open-J-Proxy/ojp/sessions/4838a8d8-f93e-4aba-844b-02e8203e6aa0 Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A recent change made OJP JDBC connection close fully synchronous, increasing close-path latency and coupling caller flow to terminate-session RPC completion. This update restores async close as the default while preserving a configurable synchronous mode.
Close semantics (driver runtime)
Connection.close()now defaults to asynchronous session termination.ojp.jdbc.connection.close.synchronous=true.Configuration surface
ojp.jdbc.connection.close.synchronous(defaultfalse).ojp.properties(including datasource-prefixed entries),DriverManager.getConnection(url, info)Properties.Execution model
Docs + contract updates