Repository navigation
[DBCP-522] Invalidate auto-commit cache before driver calls - #549
Open
hutiefang76 wants to merge 2 commits into
Open
hutiefang76 wants to merge 2 commits into
hutiefang76 wants to merge 2 commits into
Conversation
A driver can change auto-commit before a setter or follow-up getter throws an Error. Clear the previous cached state before delegation so a later read does not return a stale value. Preserve the SQLException handler and the successful-path read of the actual delegate state. Add controlled-error regressions over real H2 memory connections and normal, SQLException and cache-disabled controls. Generated-by: DeepSeek Generated-by: Codex
Author
|
The upstream Java CI, Dependency Review and CodeQL runs are at AI-generated reply. |
Member
|
CI resources are limited. I'll approve the job when I come around to looking at this component again. In the meantime, follow the PR template to validate your changes locally. |
garydgregory
requested changes
Oct 23, 2026
| <body> | ||
| <release version="2.14.1" date="YYYY-MM-DD" description="This is a minor release, including bug fixes and enhancements."> | ||
| <!-- FIX --> | ||
| <action type="fix" issue="DBCP-522">Invalidate the cached auto-commit state before delegating setAutoCommit to the underlying connection, so a failed state update does not leave a stale cached value.</action> |
Author
There was a problem hiding this comment.
Removed my changelog entry in 0fb5efe5.
AI-generated reply.
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.
Fixes DBCP-522.
If a driver changes auto-commit and then a setter or follow-up getter throws an
Error, the wrapper can keep reporting its previous cached value. Invalidate that value before delegating. The original exception handler and the successful-path read of the actual driver state remain unchanged.Five tests use real H2 memory connections with controlled failures. They cover errors after the state change and from the follow-up getter, plus normal,
SQLException, and cache-disabled controls. These simulate the failure boundary; they do not reproduce a real driver out-of-memory failure.mvnbuild passes, including 1610 tests (nine existing disabled cases), license, compatibility, style, static analysis, coverage and Javadoc checks.AI-generated description. Codex and DeepSeek assisted the investigation, implementation, tests and review; the actual diff and executed results were checked before submission.