This is an automated email from the ASF dual-hosted git repository.

yiguolei 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 32530113cfd [cherry-pick](branch-2.1) Fix some group commit forward to 
master problems (#38345)
32530113cfd is described below

commit 32530113cfdf44fd397df9587af52e3a8c8d47f0
Author: abmdocrt <yukang.lian2...@gmail.com>
AuthorDate: Thu Jul 25 14:48:02 2024 +0800

    [cherry-pick](branch-2.1) Fix some group commit forward to master problems 
(#38345)
    
    ## Proposed changes
    
    <!--Describe your changes.-->
    
    Pick #38228 #38265
---
 fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java | 3 +++
 .../src/main/java/org/apache/doris/service/FrontendServiceImpl.java   | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java 
b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
index edcbc2dd7f1..030aced411f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
@@ -365,6 +365,9 @@ public class LoadAction extends RestBaseController {
             ctx.setEnv(Env.getCurrentEnv());
             ctx.setThreadLocalInfo();
             ctx.setRemoteIP(request.getRemoteAddr());
+            // We set this variable to fulfill required field 'user' in
+            // TMasterOpRequest(FrontendService.thrift)
+            ctx.setQualifiedUser(Auth.ADMIN_USER);
             ctx.setThreadLocalInfo();
 
             try {
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java 
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 448b1231dde..4935e026f11 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -1010,7 +1010,7 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
             result.setPacket("".getBytes());
             return result;
         }
-        if (params.getGroupCommitInfo().isGetGroupCommitLoadBeId()) {
+        if (params.getGroupCommitInfo() != null && 
params.getGroupCommitInfo().isGetGroupCommitLoadBeId()) {
             final TGroupCommitInfo info = params.getGroupCommitInfo();
             final TMasterOpResult result = new TMasterOpResult();
             try {
@@ -1023,7 +1023,7 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
             result.setPacket("".getBytes());
             return result;
         }
-        if (params.getGroupCommitInfo().isUpdateLoadData()) {
+        if (params.getGroupCommitInfo() != null && 
params.getGroupCommitInfo().isUpdateLoadData()) {
             final TGroupCommitInfo info = params.getGroupCommitInfo();
             final TMasterOpResult result = new TMasterOpResult();
             Env.getCurrentEnv().getGroupCommitManager()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to