From 88e5b2460bd8d24692f63f856e1dbcc66abeb0ed Mon Sep 17 00:00:00 2001 From: rijeshkp Date: Fri, 25 Oct 2024 21:11:10 +0530 Subject: [PATCH] Forward to BE for Kill for Forwarded Queries --- .../src/main/java/org/apache/doris/qe/StmtExecutor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java index 08ad231168b9f2..55a0dd91b24c07 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java @@ -430,6 +430,10 @@ public boolean isForwardToMaster() { return isForwardedToMaster; } + public boolean isForwardedToMaster() { + return isForwardedToMaster; + } + private boolean shouldForwardToMaster() { if (Env.getCurrentEnv().isMaster()) { return false; @@ -1608,8 +1612,9 @@ private void handleKill() throws UserException { } } - if (killCtx == null) { - TUniqueId tQueryId = null; + if (killCtx == null || (context.getExecutor() != null + && context.getExecutor().isForwardedToMaster())) { + TUniqueId tQueryId; try { tQueryId = DebugUtil.parseTUniqueIdFromString(queryId); } catch (NumberFormatException e) {