github-actions[bot] commented on code in PR #62651:
URL: https://github.com/apache/doris/pull/62651#discussion_r3118130118
##########
fe/fe-core/src/main/java/org/apache/doris/qe/MysqlConnectProcessor.java:
##########
@@ -248,6 +248,7 @@ private void dispatch() throws IOException {
}
ctx.setCommand(command);
ctx.setStartTime();
+ resolveWorkloadGroupName();
Review Comment:
`resolveWorkloadGroupName()` only runs once per incoming packet here, but
`ConnectProcessor.executeQuery()` can split a `COM_QUERY` text into multiple
statements and execute them sequentially. If an earlier statement changes
`@@workload_group`, later statements that fail before `Coordinator.exec()` will
still write the stale pre-packet value to the audit log.
A concrete case is `set workload_group = "wg_a"; select * from
missing_db.t;`: the second statement is still audited with the old group, not
`wg_a`. This needs to be refreshed at the per-statement boundary in
`executeQuery()`, not only once in `dispatch()`.
--
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]