This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 93281e285be branch-3.0: [fix](group commit) fix NPE in group commit select backend (#43635) 93281e285be is described below commit 93281e285beca84b97a74a56154e1d8197721fdc Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Tue Nov 12 10:37:33 2024 +0800 branch-3.0: [fix](group commit) fix NPE in group commit select backend (#43635) Cherry-picked from #43629 Co-authored-by: meiyi <myime...@gmail.com> --- .../src/main/java/org/apache/doris/load/GroupCommitManager.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java b/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java index 3177f96cb86..3b108ed638a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java +++ b/fe/fe-core/src/main/java/org/apache/doris/load/GroupCommitManager.java @@ -328,13 +328,11 @@ public class GroupCommitManager { // Another thread gets the same tableId but can not find this tableId. // So another thread needs to get the random backend. Long backendId = tableToBeMap.get(encode(cluster, tableId)); - Backend backend; - if (backendId != null) { - backend = Env.getCurrentSystemInfo().getBackend(backendId); - } else { + if (backendId == null) { return null; } - if (backend.isActive() && !backend.isDecommissioned()) { + Backend backend = Env.getCurrentSystemInfo().getBackend(backendId); + if (backend != null && backend.isActive() && !backend.isDecommissioned()) { return backend.getId(); } else { tableToBeMap.remove(encode(cluster, tableId)); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org