[ https://issues.apache.org/jira/browse/CASSANDRA-12175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Yeschenko resolved CASSANDRA-12175. ------------------------------------------- Resolution: Not A Problem > Raise error on using NetworkTopologyStrategy w/o any DCs > -------------------------------------------------------- > > Key: CASSANDRA-12175 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12175 > Project: Cassandra > Issue Type: Improvement > Reporter: Stefan Podkowinski > Priority: Minor > Labels: lhf > > Sometimes it happens that users will create a keyspace using > NetworkTopologyStrategy but at the same time forget to specify the > corresponding data-centers. The only point where you'll notice your mistake > will be after the first insert or select statement. Even then, the error > message can be confusing, especially for beginners. > {noformat} > CREATE KEYSPACE test > WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy' }; > USE test; > CREATE TABLE airplanes ( > name text PRIMARY KEY, > manufacturer ascii, > year int, > mach float > ); > INSERT INTO airplanes > (name, manufacturer, year, mach) > VALUES ('P38-Lightning', 'Lockheed', 1937, 0.7); > Unavailable: code=1000 [Unavailable exception] message="Cannot achieve > consistency level ONE" info={'required_replicas': 1, 'alive_replicas': 0, > 'consistency': 'ONE'} > {noformat} > I don't see any point why you should be able to use NetworkTopologyStrategy > without any DCs, so I'd suggest to raise an error in this situation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)