morningman commented on a change in pull request #6702:
URL: https://github.com/apache/incubator-doris/pull/6702#discussion_r715408282



##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/rpc/BackendServiceProxy.java
##########
@@ -59,23 +61,19 @@ public static BackendServiceProxy getInstance() {
     }
 
     public void removeProxy(TNetworkAddress address) {
-        lock.writeLock().lock();
-        try {
-            serviceMap.remove(address);
-        } finally {
-            lock.writeLock().unlock();
+        LOG.warn("begin to remove proxy: {}", address);
+        BackendServiceClient service;
+        synchronized (this) {

Review comment:
       fixed.
   but `computeIfAbsent` is not suitable because we need to make sure that only 
one thread can create client for a certain BE.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to