[cherry-pick](branch-2.1) Fix some group commit forward to master problems (#38345)
## Proposed changes <!--Describe your changes.--> Pick #38228 #38265
This commit is contained in:
@ -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 {
|
||||
|
||||
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user