mvadharia commented on code in PR #2848:
URL:
https://github.com/apache/incubator-eventmesh/pull/2848#discussion_r1063957562
##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/recommend/EventMeshRecommendImpl.java:
##########
@@ -226,15 +228,16 @@ private String recommendProxy(final Map<String, String>
eventMeshMap,
log.info("eventMeshMap:{},clientDistributionMap:{},group:{}",
eventMeshMap, clientDistributionMap, group);
}
- if
(!eventMeshMap.keySet().containsAll(clientDistributionMap.keySet())) {
+ Set<String> clientdDistributionSet=new
HashSet<>(clientDistributionMap.keySet());
+ clientdDistributionSet.retainAll(eventMeshMap.keySet());
Review Comment:
@jonyangx Idea was to use retainAll() method to get intersection of two
sets of keys, if there are no element in intersection set which indirectly
proves there exist proxy(key) not register(i.e. not present in eventMeshMap)
but exist in distributionMap"
--
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]