xianjingfeng commented on code in PR #2112:
URL: https://github.com/apache/uniffle/pull/2112#discussion_r2038722464
##########
internal-client/src/main/java/org/apache/uniffle/client/factory/ShuffleServerClientFactory.java:
##########
@@ -75,9 +80,29 @@ public synchronized ShuffleServerClient
getShuffleServerClient(
return serverToClients.get(shuffleServerInfo);
}
+ public synchronized void closeClients(Set<ShuffleServerInfo> candidates) {
Review Comment:
We need use `synchronized` outside if we find the candidates outside of this
method. As follow
```java
ShuffleServerClientFactory shuffleServerClientFactory =
ShuffleServerClientFactory.getInstance();
synchronized (shuffleServerClientFactory) {
Set<ShuffleServerInfo> candidates =
shuffleServerClientFactory.findClosableClients(getAllShuffleServers());
shuffleServerClientFactory.closeClients(candidates);
}
```
It feels worse than the original implementation.
--
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]