From 3d3ceaeef33c45fb92e3d12cece22eeb35450e6d Mon Sep 17 00:00:00 2001 From: abmdocrt Date: Thu, 18 Jul 2024 09:47:18 +0800 Subject: [PATCH] [Fix](group commit) Fix group commit exception in nereids planner (#37953) --- .../src/main/java/org/apache/doris/qe/SessionVariable.java | 2 +- .../src/main/java/org/apache/doris/qe/StmtExecutor.java | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java index 7fbb595b814e1b..9a5caa5a7d1ace 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java @@ -1669,7 +1669,7 @@ public void setEnableLeftZigZag(boolean enableLeftZigZag) { @VariableMgr.VarAttr(name = LOAD_STREAM_PER_NODE) public int loadStreamPerNode = 2; - @VariableMgr.VarAttr(name = GROUP_COMMIT) + @VariableMgr.VarAttr(name = GROUP_COMMIT, needForward = true) public String groupCommit = "off_mode"; @VariableMgr.VarAttr(name = INVERTED_INDEX_CONJUNCTION_OPT_THRESHOLD, 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 a8458318bd49fe..55c553d1ecd2ad 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 @@ -717,13 +717,6 @@ private void executeByNereids(TUniqueId queryId) throws Exception { + Env.getCurrentEnv().getSelfNode().getHost() + ") and failed to execute" + " because Master FE is not ready. You may need to check FE's status")); } - if (context.getSessionVariable().isEnableInsertGroupCommit()) { - // FIXME: Group commit insert does not need to forward to master - // Nereids does not support group commit, so we can not judge if should forward - // Here throw an exception to fallback to legacy planner and let legacy judge if should forward - // After Nereids support group commit, we can remove this exception - throw new NereidsException(new UserException("Nereids does not support group commit insert")); - } forwardToMaster(); if (masterOpExecutor != null && masterOpExecutor.getQueryId() != null) { context.setQueryId(masterOpExecutor.getQueryId());