This is an automated email from the ASF dual-hosted git repository.
zouxinyi 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 a8720e645f0 [fix](fe ut) Fix borrow oject throw npe (#27072)
a8720e645f0 is described below
commit a8720e645f0b352864da29ac670579f7d596ff76
Author: deardeng <[email protected]>
AuthorDate: Fri Nov 17 19:16:29 2023 +0800
[fix](fe ut) Fix borrow oject throw npe (#27072)
occasional failure of fe ut, borrowObject throw npe
```
get agent task request. type: CREATE, signature: 10008, fe addr: null
java.lang.NullPointerException
at
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at
org.apache.commons.pool2.impl.GenericKeyedObjectPool.register(GenericKeyedObjectPool.java:1079)
at
org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:347)
get agent task request. type: CREATE, signature: 10012, fe addr:
TNetworkAddress(hostname:127.0.0.1, port:56072)
at
org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:277)
at
org.apache.doris.common.GenericPool.borrowObject(GenericPool.java:99)
at
org.apache.doris.utframe.MockedBackendFactory$DefaultBeThriftServiceImpl$1.run(MockedBackendFactory.java:219)
at java.lang.Thread.run(Thread.java:750)
```
---
.../test/java/org/apache/doris/utframe/MockedBackendFactory.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
b/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
index 860b58a47a7..b2184a5bad0 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
@@ -174,8 +174,12 @@ public class MockedBackendFactory {
FrontendService.Client client = null;
TNetworkAddress address = null;
try {
- address = backend.getFeAddress();
+ // ATTR: backend.getFeAddress must after
taskQueue.take, because fe addr thread race
TAgentTaskRequest request = taskQueue.take();
+ address = backend.getFeAddress();
+ if (address == null) {
+ System.out.println("fe addr thread race,
please check it");
+ }
System.out.println(
"get agent task request. type: " +
request.getTaskType() + ", signature: "
+ request.getSignature() + ", fe addr: " +
address);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]