roryqi opened a new issue, #12892: URL: https://github.com/apache/gravitino/issues/12892
### Version main branch ### Describe what's wrong Metadata creation hooks assign the creator as the owner through the public event dispatcher. This causes internal ownership operations to generate additional audit events for a single user-visible operation. The same problem affects all metadata creation hooks. Metalake creation also emits an internal `ADD_USER` event, while user/group deletion prechecks may emit internal `GET_OWNER` events. ### Error message and/or stacktrace ```text [2026-09-03 20:50:14.922] alice CREATE_CATALOG m1.c_alice SUCCESS GRAVITINO_SERVER [0:0:0:0:0:0:0:1] [2026-09-03 20:50:14.935] alice SET_OWNER m1.c_alice SUCCESS GRAVITINO_SERVER [0:0:0:0:0:0:0:1] ``` ### How to reproduce 1. Enable audit logging. 2. Create a metadata object, such as a catalog. 3. Observe that both the primary operation and its internal owner assignment are recorded. 4. Similar duplicate events occur for other metadata creation operations and internal owner checks. ### Additional context Internal dispatchers should be used for nested infrastructure operations. They preserve ownership and authorization behavior without emitting separate audit events. Explicit owner APIs should continue generating `SET_OWNER` and `GET_OWNER` audit logs. -- 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]
