dschneider-pivotal commented on a change in pull request #6628:
URL: https://github.com/apache/geode/pull/6628#discussion_r655585585



##########
File path: 
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
##########
@@ -1866,8 +1866,7 @@ public InternalDistributedMember getDistributedMember() {
 
     // Search through the set of all members
     for (InternalDistributedMember member : allMembers) {
-
-      Set<InetAddress> equivalentAddresses = 
dm.getEquivalents(member.getInetAddress());
+      Set<InetAddress> equivalentAddresses = dm.getEquivalents(address);

Review comment:
       This change looks wrong to me. My understanding of this method is that 
it is supposed to return all the members that use then given "address". It does 
this by iterating over the members and checking, first, is address equal to the 
member's address, and second, is address in the member's equivalent addresses. 
With your change the second condition should always be true since you are now 
getting address's equivalents and then checking if address is in them. That 
should always be true.
   At least on the open side I only see this method called from a single test: 
DistributedMemberDUnitTest#testFindMemberByName. If that is the only use then 
it seems like you could delete this test (which seems to be testing this 
method) and delete this method from the product (since it no longer uses it). 




-- 
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.

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


Reply via email to