hutiefang76 opened a new pull request, #4100:
URL: https://github.com/apache/avro/pull/4100

   ## What is the purpose of the change
   
   Fix [AVRO-4362](https://issues.apache.org/jira/browse/AVRO-4362): validating 
a name on a long-lived thread currently retains an Avro validator object and 
its classloader.
   
   Use a plain thread-local with a UTF validator fallback instead of storing 
the default validator. Parser cleanup removes an unset scope or restores the 
exact previous validator, including when closing the JSON parser throws. Custom 
and reentrant parser scopes retain their existing behavior.
   
   ## Verifying this change
   
   This change adds 12 regression tests for default construction, valid/invalid 
names, successful and failing parses, custom validator restoration, reentrant 
parsing, and parser-close failures. On the original implementation, nine 
assertions fail; the same tests pass with this change.
   
   - The 12 new tests and 65 neighboring tests pass in each of the three 
configured core modes, with no skips.
   - `cd lang/java && mvn -Dmaven.build.cache.enabled=false -pl avro -am clean 
verify` succeeds, including the official JDK 11, 17, and 21 Invoker runs. All 
12 new tests pass on each JDK; the existing Invoker suites report 6, 7, and 8 
skips respectively.
   - `cd lang/java && mvn -Dmaven.build.cache.enabled=false clean test` 
succeeds across all 26 Java modules. Final XML reports contain 4,256 passes, 8 
skips, and no failures or errors. Repeated core modes are not counted as 
distinct cases.
   - A separate bounded classloader probe on JDK 11, 17, and 21 retains the 
loader before the fix and collects it after the fix. Explicit-removal and 
terminated-thread controls collect it in both versions. The probe is separate 
from the deterministic JUnit tests.
   
   Maven runs on JDK 21 with Java 11 release compatibility; the main unit-test 
toolchain is JDK 17. Other language SDKs were not run.
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   
   ## AI disclosure
   
   The code, regression tests, and this description were generated with 
DeepSeek V4 Pro and OpenAI Codex. The local test results above were executed 
against this revision.
   


-- 
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]

Reply via email to