This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 3de3c6ff444 [fix](group commit) fix group commit session (#45800)
3de3c6ff444 is described below
commit 3de3c6ff444306ccbae4746fe5bff6c76b19c151
Author: meiyi <[email protected]>
AuthorDate: Mon Dec 23 19:09:54 2024 +0800
[fix](group commit) fix group commit session (#45800)
if connect to observer, enable group commit and do insert overwrite,
will get:
```
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage
= Nereids does not support group commit insert
```
---
.../src/main/java/org/apache/doris/qe/SessionVariable.java | 2 +-
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 9 ++-------
2 files changed, 3 insertions(+), 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 9a22c3d96e1..e9dd9ec5822 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
@@ -1785,7 +1785,7 @@ public class SessionVariable implements Serializable,
Writable {
@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 = ENABLE_PREPARED_STMT_AUDIT_LOG, needForward =
true)
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 a5ff53cb90e..e490fa2b1c6 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
@@ -711,13 +711,6 @@ public class StmtExecutor {
+ 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());
@@ -1354,6 +1347,8 @@ public class StmtExecutor {
if (context.getSessionVariable().isEnableInsertGroupCommit() &&
parsedStmt instanceof NativeInsertStmt) {
NativeInsertStmt nativeInsertStmt = (NativeInsertStmt) parsedStmt;
nativeInsertStmt.analyzeGroupCommit(new Analyzer(context.getEnv(),
context));
+ redirectStatus = parsedStmt.getRedirectStatus();
+ isForwardedToMaster = shouldForwardToMaster();
}
redirectStatus = parsedStmt.getRedirectStatus();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]