bereng commented on a change in pull request #870:
URL: https://github.com/apache/cassandra/pull/870#discussion_r574275745



##########
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:
       Btw that is why we require `requireNetwork()` on the newly added test in 
`AlterTest`. Otherwise the test sees 0 nodes and no warnings are generated.




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

Reply via email to