jahstreet commented on code in PR #2007:
URL:
https://github.com/apache/cassandra-java-driver/pull/2007#discussion_r1935316968
##########
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:
Nope, contact point nodes come without host ID, they are built in
`com.datastax.oss.driver.internal.core.session.DefaultSession.SingleThreaded#init`
->
`com.datastax.oss.driver.internal.core.metadata.MetadataManager#addContactPoints`.
We can try to do first match by `EndPoint` though.
--
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]