yuqi1129 opened a new pull request, #13262: URL: https://github.com/apache/gravitino/pull/13262
### What changes were proposed in this pull request? Skip owner preloading for entity types that are not metadata objects. Add user/group/role list expressions to the existing parent-scope optimization so metalake ownership or management grants can authorize the whole list before per-object work. Preserve the deny-policy guard and self/role-owner/membership filtering fallback. ### Why are the changes needed? Owner preloading resolves a metalake ID and a principal ID separately for every listed user/group, although these entities cannot have owners. This introduces two unnecessary metadata-store lookups per entry. Fix: #13261 ### Does this PR introduce _any_ user-facing change? Faster user/group listing and role listing with qualifying metalake-level access. No API or configuration changes; visibility rules remain unchanged. ### How was this patch tested? - 352 server-common tests and 21 user/group/role REST tests passed; formatting passed. - H2 query-count regression covers 1, 1,003, and 10,000 entries, with authorization and the cache path enabled. A mocked management grant isolates database loading and list filtering: name lists use one SELECT, user/group details use two, independently of list size. These counts exclude real caller/role authorization lookups and HTTP serialization. - Verify ordinary user/group self visibility, per-role ownership/membership, and metalake-owner access. - The initial full run hit an intermittent existing TLS missing-client-certificate assertion; a complete rerun passed. ```sh SKIP_DOCKER_TESTS=true ./gradlew :server-common:spotlessCheck :server-common:test -PskipITs -PskipDockerTests=true SKIP_DOCKER_TESTS=true ./gradlew :server:test --tests '*TestUserOperations' --tests '*TestGroupOperations' --tests '*TestRoleOperations' -PskipITs -PskipDockerTests=true ``` -- 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]
