cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Podkowinski (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-12175) Raise error on using NetworkTopologyStrategy w/o any DCs
Date Tue, 12 Jul 2016 13:37:20 GMT
Stefan Podkowinski created CASSANDRA-12175:
----------------------------------------------

             Summary: 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


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)

Mime
View raw message