You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2016/07/15 14:49:20 UTC

[jira] [Commented] (CASSANDRA-12175) Raise error on using NetworkTopologyStrategy w/o any DCs

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

Aleksey Yeschenko commented on CASSANDRA-12175:
-----------------------------------------------

This falls under the same category as 'raise error when using NTS with a non-existent DC name' or 'reject 0 as RF for DC for NTS'. There are legitimate use cases for allowing it (think a default in an automated system, that you are meant to alter as a user). I'm going to be consistent with those other ticket resolutions and mark this one as 'Not a Problem', too.

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