github-actions[bot] commented on code in PR #62141:
URL: https://github.com/apache/doris/pull/62141#discussion_r3109916852


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AlterUserCommand.java:
##########
@@ -29,7 +29,7 @@
 /**
  * AlterUserCommand
  */
-public class AlterUserCommand extends AlterCommand {
+public class AlterUserCommand extends AlterCommand implements 
NeedAuditEncryption {

Review Comment:
   `AlterUserCommand` is newly opting every `ALTER USER` statement into 
`NeedAuditEncryption.geneEncryptionSQL()`, but that audit path reparses the SQL 
text it receives. In `ConnectProcessor.executeQuery()`, single-statement 
auditing still uses `auditStmt = convertedStmt` even when `parseWithFallback()` 
had to retry and successfully parse the original SQL 
(`ConnectProcessor.java:239`, `ConnectProcessor.java:262`, 
`ConnectProcessor.java:281`).
   
   That means a successful `ALTER USER` can now hit this path with the same 
dialect-converted SQL that already failed parsing once. `geneEncryptionSQL()` 
will throw while reparsing it, `AuditLogHelper.logAuditLog()` swallows the 
exception, and the audit record is dropped entirely.
   
   Can we avoid routing `ALTER USER` through the encryption reparse path until 
it is fed the SQL text that actually produced `parsedStmt`, or otherwise make 
the audit path robust to the converted-SQL fallback case?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to