You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "jahstreet (via GitHub)" <gi...@apache.org> on 2025/01/30 08:50:59 UTC

Re: [PR] JAVA-3168 Replace contact point nodes on initial node refresh [cassandra-java-driver]

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


##########
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:
   Yes, it happens in com.datastax.oss.driver.internal.core.control.ControlConnection.SingleThreaded#onStateEvent .



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org