This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new d12b1241a1c branch-4.1: [fix](show command) some show command should
not be forward to master #69677 (#70325)
d12b1241a1c is described below
commit d12b1241a1c76b4650f246a408afc68e723f5257
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 10 09:07:58 2026 +0800
branch-4.1: [fix](show command) some show command should not be forward to
master #69677 (#70325)
Cherry-picked from #69677
Co-authored-by: yiguolei <[email protected]>
---
.../doris/nereids/trees/plans/commands/ShowProcCommand.java | 10 ++++++++++
.../trees/plans/commands/ShowWorkloadGroupsCommand.java | 7 ++-----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowProcCommand.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowProcCommand.java
index 8672a9d90f4..a6e82fa5d8c 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowProcCommand.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowProcCommand.java
@@ -38,11 +38,17 @@ import org.apache.doris.qe.StmtExecutor;
import java.util.Collections;
import java.util.List;
+import java.util.regex.Pattern;
/**
* show proc command
*/
public class ShowProcCommand extends ShowCommand {
+ // Match the repeated slashes and whitespace accepted by
ProcService.open().
+ private static final Pattern LOCAL_QUERY_PATH = Pattern.compile(
+ "[
\\t\\r\\n]*/+(?:current_queries|current_query_stmts|current_backend_instances)/*(?:[
\\t\\r\\n].*)?",
+ Pattern.DOTALL);
+
private final String path;
/**
@@ -122,6 +128,10 @@ public class ShowProcCommand extends ShowCommand {
@Override
public RedirectStatus toRedirectStatus() {
+ // These nodes read this FE's coordinators, not cluster-wide query
state.
+ if (LOCAL_QUERY_PATH.matcher(path).matches()) {
+ return RedirectStatus.NO_FORWARD;
+ }
if (ConnectContext.get().getSessionVariable().getForwardToMaster()) {
return RedirectStatus.FORWARD_NO_SYNC;
} else {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowWorkloadGroupsCommand.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowWorkloadGroupsCommand.java
index 684d559b723..1ab9a6df8cd 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowWorkloadGroupsCommand.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowWorkloadGroupsCommand.java
@@ -91,10 +91,7 @@ public class ShowWorkloadGroupsCommand extends ShowCommand {
@Override
public RedirectStatus toRedirectStatus() {
- if (ConnectContext.get().getSessionVariable().getForwardToMaster()) {
- return RedirectStatus.FORWARD_NO_SYNC;
- } else {
- return RedirectStatus.NO_FORWARD;
- }
+ // Running and waiting query counts belong to the local FE's query
queues.
+ return RedirectStatus.NO_FORWARD;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]