yuqi1129 commented on PR #11846:
URL: https://github.com/apache/gravitino/pull/11846#issuecomment-4935707872

   I pushed a reference branch for the smaller/source-level fix here:
   
   https://github.com/yuqi1129/gravitino/tree/pr-11846-capability-boundary-fix
   
   The direction is:
   
   1. Remove the enum `switch(scope)` from Hive/Glue capability 
implementations, so javac does not generate the synthetic `$1` switch-map class 
that can trigger the current `NoClassDefFoundError` after the catalog 
classloader is closed.
   2. Add a bounded capability execution path 
(`CapabilityHelpers.withCapability` / `CatalogWrapper.doWithCapabilityOps`) so 
capability logic runs while the wrapper classloader is active, and retry once 
if the cached wrapper was already closed.
   3. Migrate capability call sites to that entry point, instead of adding a 
full catalog lifecycle `ReadWriteLock` around every catalog operation.
   
   This keeps the fix focused on the source of the issue: do not let 
`Capability` escape its catalog/classloader boundary.


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