Skip to content

Commit

Permalink
[Fix](Group commit) Fix group commit forward fault (#38228)
Browse files Browse the repository at this point in the history
## Proposed changes

<!--Describe your changes.-->

When client connect to observer and do group commit, observer will
forward to master. The forward parameter `GroupCommitInfo` maybe null,
which leads to an exception.
  • Loading branch information
Yukang-Lian authored and dataroaring committed Jul 23, 2024
1 parent 5be89b9 commit 6ee0bfa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ public TMasterOpResult forward(TMasterOpRequest params) throws TException {
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 {
Expand All @@ -1047,7 +1047,7 @@ public TMasterOpResult forward(TMasterOpRequest params) throws TException {
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()
Expand Down

0 comments on commit 6ee0bfa

Please sign in to comment.