Fix NullPointerException in Firebird transaction isolation resolution#39136
Open
thswlsqls wants to merge 1 commit into
Open
Fix NullPointerException in Firebird transaction isolation resolution#39136thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
terrymanu
requested changes
Jul 17, 2026
terrymanu
left a comment
Member
There was a problem hiding this comment.
Summary
Review Result: Not Mergeable
Feedback Mode: Change Request
Reason: The explicit CONSISTENCY NPE path is fixed, but the linked issue’s no-isolation path now resolves to an unsupported isolation level.
Issues
- P1 — Omitted isolation is resolved as
NONEinstead of Firebird’s defaultCONCURRENCY- Problem:
getIsolationLevel()returnsTransactionIsolationLevel.NONEwhen the TPB contains no isolation item, and the updated test codifies that result. Firebird’s wire-protocol documentation delegates TPB semantics to the InterBase API documentation, which specifies that omitting the isolation mode meansisc_tpb_concurrency. The executor stores the returned value in the session, andProxyDatabaseConnectionManagerlater forwards JDBCTRANSACTION_NONE. The pinned Jaybird 5.0.10 mapper explicitly rejects that value. - Impact: A TPB without an explicit isolation flag avoids the original NPE but can still fail when the first backend connection is created, so the linked issue’s no-isolation scenario remains broken.
- Required Change: Please resolve omitted isolation to Firebird’s default
CONCURRENCY, represented byTransactionIsolationLevel.REPEATABLE_READin the existing mapping, and update the direct regression test accordingly. The explicitCONSISTENCYcase should remainSERIALIZABLE.
- Problem:
Review Details
- Review Focus: Code Correctness Review; CI not reviewed by request.
- Reviewed Scope: All three authoritative changed files:
RELEASE-NOTES.md,FirebirdStartTransactionPacket.java, andFirebirdStartTransactionPacketTest.java; adjacent Firebird executor, session/JDBC propagation, and Jaybird 5.0.10 mapping were traced. Latest head:5bd00f4c50bf72fe63c36a7ec629fbe8cbb362f2. PR metadata base:masterate249deba59d3583dc5464292672c5c73a92c2832; current fetchedmaster:25fa8a70da12ac6897d0af9880398a33c3021faf; local merge-base:af91b1c34cb041466449eec61ae711ec1f245d92. Both base positions produced the same three-file triple-dot scope, matching GitHub/pulls/39136/files. - Not Reviewed Scope: GitHub Actions and other CI checks; live Proxy/Firebird E2E execution.
- Verification:
./mvnw -pl database/protocol/dialect/firebird -Dtest=FirebirdStartTransactionPacketTest -Djacoco.skip=true -DskipITs -B -ntp -T1C testexited0with 8 tests passing. A direct Jaybird 5.0.10 mapper probe confirmed thatConnection.TRANSACTION_NONEthrowsIllegalArgumentException: Transaction isolation level 0 is not supported. - Release Note / User Docs: The release-note entry is present and scoped appropriately. Additional user documentation is not required because this fix introduces no intended configuration, migration, or public API change.
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 #39133.
Changes proposed in this pull request:
FirebirdStartTransactionPacket.getIsolationLevel()withnull !=before reading the BOOLEAN-formatCONCURRENCYandCONSISTENCYtransaction parameter buffer flags, so an absent flag no longer triggers an unboxingNullPointerException.READ_COMMITTED,isAutoCommit, andisReadOnly, which all testnull !=ontpb.getValue(...).assertIsolationLevelSerializableandassertIsolationLevelNoneto build the packet through the realparseBufferpath instead of reflectively injecting aCONCURRENCY -> falseentry thatparseBuffercan never produce; the previous injection masked the NPE. Remove the now-unused reflective helper and its imports.Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.