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 edcbc2dd7f..030aced411 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 448b1231dd..4935e026f1 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()