IGNITE-13286 Support Java records in binary marshaller - #13391
Open
kush2439p wants to merge 2 commits into
Open
Conversation
Author
|
Fixes the Hibernate 7 query-cache incompatibility caused by Java records. |
kush2439p
marked this pull request as ready for review
August 13, 2026 15:38
Author
|
Hi maintainers, following up on this PR since it has been open for several weeks without review. The record-handling fix and regression coverage are ready for review, and I am happy to rebase or revise the approach based on feedback. Thank you. |
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.
Summary
nnRoutes Java records through Ignite's optimized Java-serialization path, avoidingUnsafe.objectFieldOffset()on immutable record fields.nn## Root causennHibernate 7 uses a serializable record forQueryResultsCacheImpl.CacheItem. Ignite's reflective binary marshaller attempts to obtain unsafe offsets for record fields, which modern JDKs reject.nn## Changesnn- Detect records without introducing a Java 16 compile-time dependency.n- UseOptimizedMarshallerfor records.n- Make the developer warning accurately include records.n- Add a runtime-compiled serializable-record round-trip regression test; it runs on JDK 16+ and skips on older JDKs.nn## Verificationnn- Rebased on currentignite-2.17andgit diff --checkpasses.n- All 4,531ignite-coreproduction sources compile successfully on JDK 25.n- Focused test execution is blocked during unrelated full test compilation because JDK 25 removedThread.suspend()andThread.resume(), which legacy Ignite tests still reference. A supported JDK 17 is not installed locally.n- Existing GitHub check failures are fork checkout-security refusals before code execution, not test failures.nnFixes #13286