Yifan Cai created CASSANDRA-16246: ------------------------------------- Summary: Unexpected warning "Ignoring Unrecognized strategy option" for NetworkTopologyStrategy when restarting Key: CASSANDRA-16246 URL: https://issues.apache.org/jira/browse/CASSANDRA-16246 Project: Cassandra Issue Type: Bug Components: Observability/Logging Reporter: Yifan Cai Assignee: Yifan Cai
During restarting, bunch of warning messages like "AbstractReplicationStrategy.java:364 - Ignoring Unrecognized strategy option {datacenter2} passed to NetworkTopologyStrategy for keyspace distributed_test_keyspace" are logged. The warnings are not expected since the mentioned DC exist. It seems to be caused by the improper order during startup, so that when opening keyspaces it is unaware of DCs. The warning can be reproduced using the test below. {code:java} @Test public void testEmitsWarningsForNetworkTopologyStategyConfigOnRestart() throws Exception { int nodesPerDc = 2; try (Cluster cluster = builder().withConfig(c -> c.with(GOSSIP, NETWORK)) .withRacks(2, 1, nodesPerDc) .start()) { cluster.schemaChange("CREATE KEYSPACE " + KEYSPACE + " WITH replication = {'class': 'NetworkTopologyStrategy', " + "'datacenter1' : " + nodesPerDc + ", 'datacenter2' : " + nodesPerDc + " };"); cluster.get(2).nodetool("flush"); System.out.println("Stop node 2 in datacenter 1"); cluster.get(2).shutdown().get(); System.out.println("Start node 2 in datacenter 1"); cluster.get(2).startup(); List<String> result = cluster.get(2).logs().grep("Ignoring Unrecognized strategy option \\{datacenter2\\}").getResult(); Assert.assertFalse(result.isEmpty()); } } {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org