fix(java): Correct the async meta-shared layer bootstrap in ObjectStreamSerializer#3514
Open
mandrean wants to merge 2 commits intoapache:mainfrom
Open
fix(java): Correct the async meta-shared layer bootstrap in ObjectStreamSerializer#3514mandrean wants to merge 2 commits intoapache:mainfrom
mandrean wants to merge 2 commits intoapache:mainfrom
Conversation
f074bd4 to
ce6592d
Compare
2 tasks
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.
Why?
This is a follow-up to #3342 and #3344 for the
.withAsyncCompilation(true)path.While investigating a downstream flaky serialization failure on the same general
ObjectStreamSerializer/customized JDK serialization area, I found a separate issue in the async meta-shared layer JIT path.ObjectStreamSerializercan trigger that path for classes such asTreeSet/TreeMapsubclasses, and the generated layer serializer could be bootstrapped through the wrong path, causing failures such asNoSuchMethodExceptionandClassCastException.What does this PR do?
This PR fixes async meta-shared layer bootstrap for
ObjectStreamSerializerby:MetaSharedLayerSerializerdelegateObjectStreamSerializercases with nestedTreeSet/TreeMapsubclasses and customized JDK serializationCloses #3515.
Related issues
AI Contribution Checklist
yesyes, I included a completed AI Contribution Checklist in this PR description and the requiredAI Usage Disclosure.yes, I can explain and defend all important changes without AI help.yes, I reviewed AI-assisted code changes line by line before submission.yes, I ran adequate human verification and recorded evidence (checks run locally or in CI, pass/fail summary, and confirmation I reviewed results).yes, I added/updated tests and specs where required.yes, I validated protocol/performance impacts with evidence when applicable.yes, I verified licensing and provenance compliance.AI Usage Disclosure
java/fory-coremeta-shared layer codec bootstrap,ObjectStreamSerializerasync layer JIT path,ObjectStreamSerializerTestmvn -pl fory-core -am -Dtest=ObjectStreamSerializerTest,JITContextTest -Dsurefire.failIfNoSpecifiedTests=false testlocally and reviewed the passing results; also validated the downstream reproducer with the patched local Fory build and reviewed the passing targeted test result (which fails without the fixes here)Does this PR introduce any user-facing change?
Benchmark
No formal benchmark claim is included in this PR.
This PR is a correctness fix for async layer serializer bootstrap. I did run exploratory local checks against the existing general compatible/meta-shared proxy benchmarks and did not see a consistent overall regression.
I also locally created a focused JMH benchmark intended to exercise the exact
ObjectStreamSerializerasync layer JIT hot path touched by this change. However, on the baseline code that benchmark reproduces the bug fixed by this PR and fails during setup with the sameNoSuchMethodException/ClassCastExceptionasync layer bootstrap errors, so it was not possible to establish a reliable before-fix baseline from that targeted benchmark.