This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 446514e6a66 [fix](group commit) fix NPE in group commit select backend
(#43629)
446514e6a66 is described below
commit 446514e6a666a64863ea3e47cf72d91e4dd378c2
Author: meiyi <[email protected]>
AuthorDate: Mon Nov 11 21:55:11 2024 +0800
[fix](group commit) fix NPE in group commit select backend (#43629)
Problem Summary:
```
2024-11-11 12:00:12,200 WARN (mysql-nio-pool-24123|259) execute Exception.
stmt[15559118, 7d88d2401de44f4b-8325fbee3de50791]
java.lang.NullPointerException: Cannot invoke
"org.apache.doris.system.Backend.isActive()" because "backend" is null
at
org.apache.doris.load.GroupCommitManager.getCachedBackend(GroupCommitManager.java:305)
~[doris-fe.jar:1.2-SNAPSHOT]
at
org.apache.doris.load.GroupCommitManager.selectBackendForCloudGroupCommitInternal(GroupCommitManager.java:251)
~[doris-fe.jar:1.2-SNAPSHOT]
at
org.apache.doris.load.GroupCommitManager.selectBackendForGroupCommitInternal(GroupCommitManager.java:239)
~[doris-fe.jar:1.2-SNAPSHOT]
at
org.apache.doris.load.GroupCommitManager.selectBackendForGroupCommit(GroupCommitManager.java:203)
~[doris-fe.jar:1.2-SNAPSHOT]
at
org.apache.doris.cloud.planner.CloudGroupCommitPlanner.selectBackends(CloudGroupCommitPlanner.java:49)
~[doris-fe.jar:1.2-SNAPSHOT]
```
Co-authored-by: meiyi <[email protected]>
---
.../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: [email protected]
For additional commands, e-mail: [email protected]