You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "adutra (via GitHub)" <gi...@apache.org> on 2025/01/30 17:52:12 UTC
Re: [PR] JAVA-3168 Copy node info for contact points on initial node refresh only from first match by endpoint [cassandra-java-driver]
adutra commented on code in PR #2007:
URL: https://github.com/apache/cassandra-java-driver/pull/2007#discussion_r1936047329
##########
core/src/main/java/com/datastax/oss/driver/internal/core/metadata/InitialNodeListRefresh.java:
##########
@@ -63,22 +63,29 @@ public Result compute(
TokenFactory tokenFactory = null;
Map<UUID, DefaultNode> newNodes = new HashMap<>();
+ // Contact point nodes don't have host ID as well as other info yet, so we fill them with node
+ // info found on first match by endpoint
+ Set<DefaultNode> matchedContactPoints = new HashSet<>();
Review Comment:
I'm a bit surprised: `DefaultNode` doesn't implement `hashCode()` and `equals()`. I wonder if methods like `contains()` and `add()` (used below) won't misbehave? Wouldn't be better to use `Set<EndPoint>` here? It seems doable.
--
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