cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12175) Raise error on using NetworkTopologyStrategy w/o any DCs
Date Fri, 15 Jul 2016 14:49:20 GMT


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

View raw message