cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hazel Bobrins (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-12753) Create MV can corrupt C*, blocking all further table actions and startup
Date Thu, 06 Oct 2016 09:12:20 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-12753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hazel Bobrins updated CASSANDRA-12753:
--------------------------------------
    Description: 
Creating a MV with a protected field name e.g. 'set' results in an error. Post this failed
MV create all further actions in the keyspace fail and node startup fails until the keyspace
is dropped.

Tested on a fresh 3.0.9 install single node cluster.

How to reproduce

cassandra@cqlsh:test1> CREATE KEYSPACE test1 WITH replication = {'class': 'SimpleStrategy',
'replication_factor': 1 } AND durable_writes = 'true';
cassandra@cqlsh:test1> use test1 ;
cassandra@cqlsh:test1> CREATE TABLE main_table ( field1 text, field2 text, "set" text,
PRIMARY KEY ( field1, field2 ) );
cassandra@cqlsh:test1> CREATE MATERIALIZED VIEW mv1 AS SELECT field2, field1, "set" FROM
main_table WHERE field1 IS NOT NULL AND field2 IS NOT NULL PRIMARY KEY ( field2, field1 )
;
ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.SyntaxException:
line 1:23 no viable alternative at input 'set' (SELECT field1, field2, [set]...)

## Attached stack traces - 'MV_Create' thrown at this point

cassandra@cqlsh:test1> drop TABLE main_table ;
ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.SyntaxException:
line 1:23 no viable alternative at input 'set' (SELECT field1, field2, [set]...)

## Attached stacke traces - 'Table_drop' thrown at this point


Finally restart Cassandra. Attached stack 'Cass_start' thrown at this point and C* does not
start.

Dropping the keyspace does work, however, this must obviously be done before stopping the
node.

We have also tested this on a 4 node cluster, post the MV create all nodes report the same
issue.

  was:
Creating a MV with a protected field name e.g. 'set' results in an error. Post this failed
MV create all further actions in the keyspace fail and node startup fails until the keyspace
is dropped.

Tested on a fresh 3.0.9 install single node cluster.

How to reproduce

cassandra@cqlsh:test1> CREATE KEYSPACE test1 WITH replication = {'class': 'SimpleStrategy',
'replication_factor': 1 } AND durable_writes = 'true';
cassandra@cqlsh:test1> use test1 ;
cassandra@cqlsh:test1> CREATE TABLE main_table ( field1 text, field2 text, "set" text,
PRIMARY KEY ( field1, field2 ) );
cassandra@cqlsh:test1> CREATE MATERIALIZED VIEW mv1 AS SELECT field2, field1, "set" FROM
main_table WHERE field1 IS NOT NULL AND field2 IS NOT NULL PRIMARY KEY ( field2, field1 )
;
ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.SyntaxException:
line 1:23 no viable alternative at input 'set' (SELECT field1, field2, [set]...)

## Attached stack traces - 'MV_Create' thrown at this point

cassandra@cqlsh:test1> drop TABLE main_table ;
ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.SyntaxException:
line 1:23 no viable alternative at input 'set' (SELECT field1, field2, [set]...)

## Attached stacke traces - 'Table_drop' thrown at this point


Finally restart Cassandra. Attach stack 'Cass_start' thrown at this point and C* does not
start.

Dropping the keyspace does work, however, this must obviously be done before stopping the
node.

We have also tested this on a 4 node cluster, post the MV create all nodes report the same
issue.


> Create MV can corrupt C*, blocking all further table actions and startup
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12753
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12753
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: RHEL6.5
> Cas 3.0.9
>            Reporter: Hazel Bobrins
>            Priority: Critical
>         Attachments: Cass_start.txt, MV_Create.txt, table_drop.txt
>
>
> Creating a MV with a protected field name e.g. 'set' results in an error. Post this failed
MV create all further actions in the keyspace fail and node startup fails until the keyspace
is dropped.
> Tested on a fresh 3.0.9 install single node cluster.
> How to reproduce
> cassandra@cqlsh:test1> CREATE KEYSPACE test1 WITH replication = {'class': 'SimpleStrategy',
'replication_factor': 1 } AND durable_writes = 'true';
> cassandra@cqlsh:test1> use test1 ;
> cassandra@cqlsh:test1> CREATE TABLE main_table ( field1 text, field2 text, "set" text,
PRIMARY KEY ( field1, field2 ) );
> cassandra@cqlsh:test1> CREATE MATERIALIZED VIEW mv1 AS SELECT field2, field1, "set"
FROM main_table WHERE field1 IS NOT NULL AND field2 IS NOT NULL PRIMARY KEY ( field2, field1
) ;
> ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.SyntaxException:
line 1:23 no viable alternative at input 'set' (SELECT field1, field2, [set]...)
> ## Attached stack traces - 'MV_Create' thrown at this point
> cassandra@cqlsh:test1> drop TABLE main_table ;
> ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.SyntaxException:
line 1:23 no viable alternative at input 'set' (SELECT field1, field2, [set]...)
> ## Attached stacke traces - 'Table_drop' thrown at this point
> Finally restart Cassandra. Attached stack 'Cass_start' thrown at this point and C* does
not start.
> Dropping the keyspace does work, however, this must obviously be done before stopping
the node.
> We have also tested this on a 4 node cluster, post the MV create all nodes report the
same issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message