jahstreet commented on code in PR #2007:
URL: 
https://github.com/apache/cassandra-java-driver/pull/2007#discussion_r1935296783


##########
core/src/main/java/com/datastax/oss/driver/internal/core/metadata/InitialNodeListRefresh.java:
##########
@@ -90,30 +83,16 @@ public Result compute(
     }
 
     ImmutableList.Builder<Object> eventsBuilder = ImmutableList.builder();
-
     for (DefaultNode newNode : newNodes.values()) {
-      if (findIn(contactPoints, newNode.getEndPoint()) == null) {
-        eventsBuilder.add(NodeStateEvent.added(newNode));
-      }
+      eventsBuilder.add(NodeStateEvent.added(newNode));
     }
     for (DefaultNode contactPoint : contactPoints) {
-      if (findIn(newNodes.values(), contactPoint.getEndPoint()) == null) {
-        eventsBuilder.add(NodeStateEvent.removed(contactPoint));
-      }
+      eventsBuilder.add(NodeStateEvent.removed(contactPoint));

Review Comment:
   What if we check whether to reuse the contact point node by host ID? Then we 
can avoid that.



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