roryqi opened a new issue, #13007:
URL: https://github.com/apache/gravitino/issues/13007

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   After #12893 routed automatic ownership operations through internal 
dispatchers, the dispatcher order introduced by #10834 was no longer necessary.
   
   The current `Hook -> Event -> Normalize -> Operation` order can emit a 
successful CREATE event before the ownership hook completes. If owner 
assignment subsequently fails, the request fails even though a success event 
has already been emitted.
   
   In addition, bulk role creation still uses the public owner dispatcher and 
emits nested SET_OWNER events.
   
   ### Error message and/or stacktrace
   
   N/A. The issue is an inconsistency between the operation result and emitted 
audit events.
   
   ### How to reproduce
   
   1. Enable authorization and an event listener.
   2. Trigger a CREATE operation and make automatic owner assignment fail.
   3. Observe that the request fails after a successful CREATE event has 
already been emitted.
   4. Alternatively, create roles through the bulk API and observe nested 
SET_OWNER events.
   
   ### Additional context
   
   Related to #10713, #10834, #12892, and #12893.
   


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