yuqi1129 opened a new pull request, #13196: URL: https://github.com/apache/gravitino/pull/13196
### What changes were proposed in this pull request? `TableHookDispatcher.dropTable`/`purgeTable`, `SchemaHookDispatcher.dropSchema`, `FilesetHookDispatcher.dropFileset` and `TopicHookDispatcher.dropTopic` now call `AuthorizationUtils.authorizationPluginRemovePrivileges` only when the inner dispatcher returned `true`. Adds one test per hook that verifies a `false` result leaves the plugin untouched. ### Why are the changes needed? #12232 made the dispatchers keep the store registration when the external drop returns `false` (the object was renamed or dropped out of band), but the hook layer still removed the authorization-plugin privileges unconditionally. Under a concurrent rename × drop the entity alive under its new name lost its Ranger privileges while keeping its Gravitino registration. `FunctionHookDispatcher` already had the guard; this aligns the other four. Fix: #13174 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New unit tests `testDrop*KeepsPrivilegesWhen*ReturnsFalse` in the four `Test*HookDispatcher` classes; all `*HookDispatcher` tests pass (`./gradlew :core:test --tests '*HookDispatcher' -PskipITs`). -- 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]
