bereng commented on a change in pull request #870:
URL: https://github.com/apache/cassandra/pull/870#discussion_r574266219
##########
File path: src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
##########
@@ -302,6 +310,36 @@ public void validateOptions() throws ConfigurationException
}
}
+ @Override
+ public void maybeWarnOnOptions()
+ {
+ if (!SchemaConstants.isSystemKeyspace(keyspaceName))
+ {
+ ImmutableMultimap<String, InetAddressAndPort> dcsNodes =
StorageService.instance.getTokenMetadata()
+
.getDC2AllEndpoints(snitch);
+ for (Entry<String, String> e : this.configOptions.entrySet())
+ {
+
+ String dc = e.getKey();
+ ReplicationFactor rf = getReplicationFactor(dc);
+ int nodeCount = dcsNodes.get(dc).size();
+ // nodeCount==0 on many tests
Review comment:
Tests that don't set up a complete cluster with network, gossip, etc
will return the number of available nodes as '0', which makes sense but only
for a testing env where things are half-baked.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]