[ 
https://issues.apache.org/jira/browse/CASSANDRA-16246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17746090#comment-17746090
 ] 

Manish Khandelwal edited comment on CASSANDRA-16246 at 7/23/23 3:40 PM:
------------------------------------------------------------------------

I am seeing these warnings in nodes of my DC1 for DC2 for Cassandra 4.0.10. 
What could be the reason. DC2 exists in our case. Nodes in DC2 are not showing 
such messages.

2023-07-23 17:03:09,706 AbstractReplicationStrategy.java:337 - Ignoring 
Unrecognized strategy option \{DC2} passed to NetworkTopologyStrategy for 
keyspace keyspace_name

 


was (Author: manmagic3):
I am seeing these warnings in nodes of my DC1 for DC2 for Cassandra 4.0.10. 
What could be the reason. DC2 exists in our case.

> 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
>            Priority: Normal
>             Fix For: 4.0-beta4, 4.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to