github-actions[bot] commented on code in PR #68111:
URL: https://github.com/apache/doris/pull/68111#discussion_r4033188568
##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java:
##########
@@ -1504,10 +1504,14 @@ public List<String> toRow(int connId, long nowMs,
Optional<String> timeZone) {
}
row.add(Env.getCurrentEnv().getSelfNode().getHost());
- if (cloudCluster == null) {
+ String currentCloudCluster = sessionVariable.getCloudCluster();
Review Comment:
[P2] Gate this precedence on cloud mode
cloud_cluster/compute_group remains settable in shared-nothing mode, but
ConnectContext.getComputeGroup() ignores it there and getCloudCluster() rejects
non-cloud mode. Thus SET cloud_cluster='fake'; SHOW PROCESSLIST now reports
fake even though no query was routed to that group; before this hunk the cached
cloud field remained null. The new test also runs without cloud mode, so it
codifies this misleading result. Please retain the old non-cloud value and add
explicit cloud/non-cloud coverage.
##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java:
##########
@@ -1504,10 +1504,14 @@ public List<String> toRow(int connId, long nowMs,
Optional<String> timeZone) {
}
row.add(Env.getCurrentEnv().getSelfNode().getHost());
- if (cloudCluster == null) {
+ String currentCloudCluster = sessionVariable.getCloudCluster();
Review Comment:
[P2] Publish the resolved group for the active statement
The live SessionVariable is not a stable snapshot of the query represented
by this row:
- COM_STMT_EXECUTE publishes the executor before retained-hint analysis
writes the plain cloudCluster field, so a concurrent local/RPC PROCESSLIST read
has no happens-before guarantee for the hinted group.
- Persisted-view analysis publishes a fresh SessionVariable through
AutoCloseSessionVariable; it copies only affectQueryResultInPlan fields, so
cloudCluster is empty until the original object is restored.
- Arrow Flight captures then reverts SET_VAR before
fetchArrowFlightSchema(5000) completes, while command/executor/SQL still expose
the dispatched query.
These paths can display the persistent/cached group or NULL while the active
query routes elsewhere. Please publish a ConnectContext-level volatile snapshot
of the exact resolved routing group before forwarding/backend selection,
preserve it across temporary session swaps and SET_VAR reversion, and retire it
atomically with the active statement. Simply preferring effectiveCloudCluster
is insufficient because it is populated only in finally, contains the raw
session value, and survives into idle state. Please add controlled prepared,
view-analysis, and Flight lifecycle tests for local and RPC rendering.
--
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]