FANNG1 commented on PR #10488:
URL: https://github.com/apache/gravitino/pull/10488#issuecomment-4109419202

   I found two behavior regressions in this change:
   
   1. The new enable/disable catalog/metalake events are not wired into the 
legacy audit formatter path. `SimpleFormatter` still relies on 
`AuditLog.Operation.fromEvent(...)`, but the `AuditLog.Operation` enum and its 
`fromEvent` instanceof chain do not include any of the newly added 
enable/disable events. As a result, these events will be emitted as 
`UNKNOWN_OPERATION` in v1 audit logs. Relevant code: 
`core/src/main/java/org/apache/gravitino/audit/AuditLog.java`.
   
   2. The v2 audit compatibility mapping is also missing these new operation 
types. This PR adds `ENABLE_CATALOG`, `DISABLE_CATALOG`, `ENABLE_METALAKE`, and 
`DISABLE_METALAKE` to `OperationType`, but 
`CompatibilityUtils.operationTypeMap` does not map them, so 
`SimpleAuditLogV2.operation()` will also fall back to `UNKNOWN_OPERATION`. 
Relevant code: 
`core/src/main/java/org/apache/gravitino/audit/v2/CompatibilityUtils.java`.
   
   So the dispatcher changes look reasonable, but audit compatibility is 
incomplete and would regress downstream consumers that depend on concrete 
operation names.


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