fix(java): Correct generated ObjectStream layer bootstrap for GraalVM#3533
Closed
chaokunyang wants to merge 7 commits intoapache:mainfrom
Closed
fix(java): Correct generated ObjectStream layer bootstrap for GraalVM#3533chaokunyang wants to merge 7 commits intoapache:mainfrom
chaokunyang wants to merge 7 commits intoapache:mainfrom
Conversation
# Conflicts: # java/fory-core/src/main/java/org/apache/fory/builder/MetaSharedLayerCodecBuilder.java # java/fory-core/src/test/java/org/apache/fory/serializer/ObjectStreamSerializerTest.java
Collaborator
Author
|
@mandrean I do not have the write permission to update your pr, so I created a new pr to address the errorrs |
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 PR addresses the same bug as #3514 and is intended to replace it from a writable fork branch.
ObjectStreamSerializercan hit the async/generated meta-shared layer path for customized JDK serialization cases such asTreeSet/TreeMapsubclasses. The original failure is tracked in #3515. The JVM-side async fix is necessary, but the final implementation also has to keep the generated layer serializer working for GraalVM native-image runtime.What does this PR do?
ObjectStreamSerializerTypeDefmetadata through the GraalVM registry so newly created runtimeForyinstances can rebuild generated layer serializers correctlyObjectStreamSerializercase usingdefaultWriteObject/defaultReadObjectwithTreeSet/TreeMapsubclassesThis PR supersedes #3514.
Closes #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-coregenerated meta-shared layer bootstrap, GraalVM runtime registry/bootstrap path,integration_tests/graalvm_testsDoes this PR introduce any user-facing change?
Testing
ENABLE_FORY_DEBUG_OUTPUT=1 mvn -pl fory-core -am -Dtest=org.apache.fory.serializer.ObjectStreamSerializerTest,org.apache.fory.builder.JITContextTest -Dsurefire.failIfNoSpecifiedTests=false -nsu testmvn -pl fory-core -DskipTests -nsu checkstyle:checkmvn -T16 -pl fory-core,fory-graalvm-feature -am install -DskipTests -nsucd integration_tests/graalvm_tests && mvn -T8 -DskipTests=true -Pnative packagecd integration_tests/graalvm_tests && ./target/main