kamisama0002 opened a new pull request, #13990:
URL: https://github.com/apache/gravitino/pull/13990

   ### What changes were proposed in this pull request?
   
   Unwrap Gravitino's isolated context loaders to their shared base and use 
that captured base as the new loader's parent. Preserve ordinary custom context 
loaders and fall back to Gravitino's defining loader for a null TCCL.
   
   Add tests with a generated fixture JAR for nested loaders, closed contexts, 
provider isolation, different pool keys, custom contexts and null contexts.
   
   ### Why are the changes needed?
   
   A new loader can retain another catalog loader as its base or parent. After 
that catalog closes, the surviving loader may reuse its provider class and fail 
when a method first resolves an unloaded dependency. This reproduces with 
`OSSFileSystemProvider` and `AliyunOSSFileSystem`, including when full pool 
cleanup runs.
   
   Fix: #13989
   
   ### Does this PR introduce _any_ user-facing change?
   
   Nested loaders can resolve their dependencies after the original context 
owner closes. No API or configuration changes.
   
   ### How was this patch tested?
   
   Tested on CentOS Stream 10, JDK 17.0.19 and Gradle 8.2:
   
   ```bash
   ./gradlew :core:coreUnitTest :core:jar :catalogs:catalog-common:test 
:core:spotlessCheck -PskipITs --configure-on-demand
   ```
   
   - Core: 2,453 passed, 2 existing disabled tests skipped, 0 failures. Catalog 
common: 40 passed. Spotless and Error Prone passed.
   - `TestIsolatedClassLoader`: 6 of 12 cases fail with the original 
implementation; all 12 pass with this patch.
   - Separate OSS reproduction with the built core JAR, real OSS provider and 
Hadoop 3.3.6: 4 of 8 cases fail before the fix; all 8 pass after it. This 
includes releasing a different pool key through full cleanup. Synthetic 
credentials and a local endpoint are sufficient; no bucket operations are 
performed.
   


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