chaokunyang opened a new pull request, #3495:
URL: https://github.com/apache/fory/pull/3495

   ## Why?
   
   The current hash-based isolation is still fragile because the GraalVM 
registry can consume `configHash` before registration is complete. Later 
registrations then mutate the hash and split a single `Fory` instance across 
multiple hash buckets. Several public registration APIs also bypass the hash 
update entirely.
   
   ## What does this PR do?
   
   - keep the hash-based isolation approach
   - stabilize the hash only for GraalVM native-image registry state
   - keep the normal JVM codegen hash mutable while registration is still open
   - route GraalVM class registration through `Fory` so native registrations 
are deferred until the stable hash is finalized
   - include named registration, string registration, `registerUnion(...)`, 
`registerSerializer(Function)`, and `registerSerializerAndType(...)` in the 
hash accumulator
   - add focused regression tests for cache isolation and the additional 
registration paths
   
   ## Verification
   
   - `cd java && ENABLE_FORY_DEBUG_OUTPUT=1 mvn -T4 -pl fory-core 
-Dtest=org.apache.fory.xlang.RegisterTest,org.apache.fory.serializer.TimeSerializersTest,org.apache.fory.resolver.ClassResolverTest
 test`
   - `cd java && mvn -T4 -pl fory-core -DskipTests spotless:check 
checkstyle:check`
   
   ## Related issues
   
   Closes #3116
   Supersedes #3122
   
   ## Does this PR introduce any user-facing change?
   
   No.
   
   - [ ] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?
   
   ## Benchmark
   
   Not applicable. This is a correctness fix; no benchmark logic changed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to