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

   ### What changes were proposed in this pull request?
   
   This PR extracts the infrastructure part from #10996 to support the 
follow-up JcasbinAuthorizer cache refactor.
   
   It includes:
   - Add a generic `GravitinoCache` abstraction with Caffeine and no-op 
implementations.
   - Add per-request lookup caches in `AuthorizationRequestContext` for user, 
group, metadata id, and owner lookup deduplication.
   - Thread `AuthorizationRequestContext` through authorization filter/executor 
paths.
   - Update `isMetalakeUser` to accept `AuthorizationRequestContext`.
   - Switch entity/owner change polling mapper APIs to id-based cursors and 
expose latest id lookup helpers.
   
   This PR intentionally does not rewrite `JcasbinAuthorizer` cache behavior. 
The JcasbinAuthorizer version-validated cache refactor will stay in the 
follow-up PR.
   
   ### Why are the changes needed?
   
   This reduces the size of #10996 and provides the reusable support layer 
needed by the JcasbinAuthorizer cache refactor.
   
   Fix: #11032
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   - `./gradlew :core:spotlessApply :server-common:spotlessApply 
:server:spotlessApply`
   - `./gradlew :core:test --tests 
org.apache.gravitino.authorization.TestAuthorizationRequestContext --tests 
org.apache.gravitino.cache.TestGravitinoCache --tests 
org.apache.gravitino.storage.relational.mapper.provider.base.TestAuthMappers 
--tests 
org.apache.gravitino.storage.relational.mapper.provider.base.TestEntityChangeLogMapper
 --tests 
org.apache.gravitino.storage.relational.service.TestEntityChangeLogService 
--tests org.apache.gravitino.storage.relational.service.TestTableMetaService 
:server-common:test --tests 
org.apache.gravitino.server.authorization.TestPassThroughAuthorizer 
:server:test --tests 
org.apache.gravitino.server.web.filter.TestGravitinoInterceptionService`


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