cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cathy Daw (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2566) CQL: Batch Updates: some consistency levels not working
Date Tue, 26 Apr 2011 20:59:03 GMT

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

Cathy Daw updated CASSANDRA-2566:
---------------------------------

    Description: 
Testing the batch updates, and running into some issues with different consistency levels

_Note: hopefully not offending anyone by putting multiple bugs in one JIRA, but they all seem
related, so decided to add them in one.  After triage I can split this out, if needed._

+*Summary*+
* PASS: CONSISTENCY  ONE
* PASS: CONSISTENCY  QUORUM
* PASS: CONSISTENCY  ALL
* CQL ERROR: CONSISTENCY ZERO

The following were run on a single node which did not have a DC setup so the test isn't fully
accurate, but didn't expect exceptions. The following work fine for DELETE
* THRIFT ERROR: CONSISTENCY  DCQUORUM
* THRIFT ERROR:CONSISTENCY  DCQUORUMSYNC

The following are not in the CQL Documentation as supported, but I saw a bug which says we
need to support them for all strategy types.  The following are also broken for DELETE.
* CQL ERROR: CONSISTENCY  LOCAL_QUORUM
* CQL ERROR: CONSISTENCY  EACH_QUORUM

 
+*Test Setup*+
{code}
CREATE KEYSPACE cqldb with strategy_class =  'org.apache.cassandra.locator.SimpleStrategy'
 
and strategy_options:replication_factor=1;

use cqldb;

CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY, password varchar, gender varchar, 
session_token varchar, state varchar, birth_year bigint);

INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user1', 'ch@ngem3',
'f', 'CA', '1971');
INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user2', 'ch@ngem3',
'f', 'CA', '1972');
INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user3', 'ch@ngem3',
'f', 'CA', '1973');
{code}


+*Bug Details*+

*CONSISTENCY ZERO*
{code}
BEGIN BATCH USING CONSISTENCY ZERO
UPDATE users SET state = 'TX' WHERE KEY = 'user1';
UPDATE users SET state = 'TX' WHERE KEY = 'user2';
UPDATE users SET state = 'TX' WHERE KEY = 'user3';
APPLY BATCH

cqlsh> Bad Request: line 1:30 mismatched input 'ZERO' expecting K_LEVEL
{code}

*CONSISTENCY LOCAL_QUORUM*
{code}
BEGIN BATCH USING CONSISTENCY  LOCAL_QUORUM
UPDATE users SET state = 'UT' WHERE KEY = 'user1';
UPDATE users SET state = 'UT' WHERE KEY = 'user2';
UPDATE users SET state = 'UT' WHERE KEY = 'user3';
APPLY BATCH

cqlsh>  Bad Request: line 1:31 mismatched input 'LOCAL_QUORUM' expecting K_LEVEL
{code}

*CONSISTENCY EACH_QUORUM*
{code}
BEGIN BATCH USING CONSISTENCY  EACH_QUORUM
UPDATE users SET state = 'TX' WHERE KEY = 'user1';
UPDATE users SET state = 'TX' WHERE KEY = 'user2';
UPDATE users SET state = 'TX' WHERE KEY = 'user3';
APPLY BATCH

cqlsh> Bad Request: line 1:31 mismatched input 'EACH_QUORUM' expecting K_LEVEL
{code}


*CONSISTENCY DCQUORUM*
{code}
cqlsh> DELETE FROM users USING CONSISTENCY DCQUORUM where KEY = 'user2' ; -- PASSES
{code}

{code}
BEGIN BATCH USING CONSISTENCY  DCQUORUM
UPDATE users SET state = 'WA' WHERE KEY = 'user1';
UPDATE users SET state = 'WA' WHERE KEY = 'user2';
UPDATE users SET state = 'WA' WHERE KEY = 'user3';
APPLY BATCH	

cqlsh> Internal application error


ERROR 19:20:39,087 Internal error processing execute_cql_query
java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUM
	at java.lang.Enum.valueOf(Enum.java:214)
	at org.apache.cassandra.thrift.ConsistencyLevel.valueOf(ConsistencyLevel.java:76)
	at org.apache.cassandra.cql.CqlParser.batchUpdateStatement(CqlParser.java:1062)
	at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:232)
	at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:834)
	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:463)
	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1127)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
{code}

*CONSISTENCY DCQUORUMSYNC*
{code}
cqlsh> DELETE FROM users USING CONSISTENCY DCQUORUMSYNC where KEY = 'user2' ; -- PASSES
{code}

{code}
BEGIN BATCH USING CONSISTENCY  DCQUORUMSYNC
UPDATE users SET state = 'NY' WHERE KEY = 'user1';
UPDATE users SET state = 'NY' WHERE KEY = 'user2';
UPDATE users SET state = 'NY' WHERE KEY = 'user3';
APPLY BATCH	

cqlsh> Internal application error

ERROR 19:22:19,482 Internal error processing execute_cql_query
java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUMSYNC
	at java.lang.Enum.valueOf(Enum.java:214)
	at org.apache.cassandra.thrift.ConsistencyLevel.valueOf(ConsistencyLevel.java:76)
	at org.apache.cassandra.cql.CqlParser.batchUpdateStatement(CqlParser.java:1062)
	at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:232)
	at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:834)
	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:463)
	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1127)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
{code}


  was:
Testing the batch updates, and running into some issues with different consistency levels

_Note: hopefully not offending anyone by putting multiple bugs in one JIRA, but they all seem
related, so decided to add them in one.  After triage I can split this out, if needed._

+*Summary*+
* PASS: CONSISTENCY  ONE
* PASS: CONSISTENCY  QUORUM
* PASS: CONSISTENCY  ALL
* CQL ERROR: CONSISTENCY ZERO

The following were run on a single node which did not have a DC setup so the test isn't fully
accurate, but didn't expect exceptions:
* THRIFT ERROR: CONSISTENCY  DCQUORUM
* THRIFT ERROR:CONSISTENCY  DCQUORUMSYNC

The following are not in the CQL Documentation as supported, but I saw a bug which says we
need to support them for all strategy types
* CQL ERROR: CONSISTENCY  LOCAL_QUORUM
* CQL ERROR: CONSISTENCY  EACH_QUORUM

 
+*Test Setup*+
{code}
CREATE KEYSPACE cqldb with strategy_class =  'org.apache.cassandra.locator.SimpleStrategy'
 
and strategy_options:replication_factor=1;

use cqldb;

CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY, password varchar, gender varchar, 
session_token varchar, state varchar, birth_year bigint);

INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user1', 'ch@ngem3',
'f', 'CA', '1971');
INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user2', 'ch@ngem3',
'f', 'CA', '1972');
INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user3', 'ch@ngem3',
'f', 'CA', '1973');
{code}


+*Bug Details*+

*CONSISTENCY ZERO*
{code}
BEGIN BATCH USING CONSISTENCY ZERO
UPDATE users SET state = 'TX' WHERE KEY = 'user1';
UPDATE users SET state = 'TX' WHERE KEY = 'user2';
UPDATE users SET state = 'TX' WHERE KEY = 'user3';
APPLY BATCH

cqlsh> Bad Request: line 1:30 mismatched input 'ZERO' expecting K_LEVEL
{code}

*CONSISTENCY LOCAL_QUORUM*
{code}
BEGIN BATCH USING CONSISTENCY  LOCAL_QUORUM
UPDATE users SET state = 'UT' WHERE KEY = 'user1';
UPDATE users SET state = 'UT' WHERE KEY = 'user2';
UPDATE users SET state = 'UT' WHERE KEY = 'user3';
APPLY BATCH

cqlsh>  Bad Request: line 1:31 mismatched input 'LOCAL_QUORUM' expecting K_LEVEL
{code}

*CONSISTENCY EACH_QUORUM*
{code}
BEGIN BATCH USING CONSISTENCY  EACH_QUORUM
UPDATE users SET state = 'TX' WHERE KEY = 'user1';
UPDATE users SET state = 'TX' WHERE KEY = 'user2';
UPDATE users SET state = 'TX' WHERE KEY = 'user3';
APPLY BATCH

cqlsh> Bad Request: line 1:31 mismatched input 'EACH_QUORUM' expecting K_LEVEL
{code}


*CONSISTENCY DCQUORUM*
{code}
BEGIN BATCH USING CONSISTENCY  DCQUORUM
UPDATE users SET state = 'WA' WHERE KEY = 'user1';
UPDATE users SET state = 'WA' WHERE KEY = 'user2';
UPDATE users SET state = 'WA' WHERE KEY = 'user3';
APPLY BATCH	

cqlsh> Internal application error


ERROR 19:20:39,087 Internal error processing execute_cql_query
java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUM
	at java.lang.Enum.valueOf(Enum.java:214)
	at org.apache.cassandra.thrift.ConsistencyLevel.valueOf(ConsistencyLevel.java:76)
	at org.apache.cassandra.cql.CqlParser.batchUpdateStatement(CqlParser.java:1062)
	at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:232)
	at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:834)
	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:463)
	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1127)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
{code}

*CONSISTENCY DCQUORUMSYNC*
{code}
BEGIN BATCH USING CONSISTENCY  DCQUORUMSYNC
UPDATE users SET state = 'NY' WHERE KEY = 'user1';
UPDATE users SET state = 'NY' WHERE KEY = 'user2';
UPDATE users SET state = 'NY' WHERE KEY = 'user3';
APPLY BATCH	

cqlsh> Internal application error

ERROR 19:22:19,482 Internal error processing execute_cql_query
java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUMSYNC
	at java.lang.Enum.valueOf(Enum.java:214)
	at org.apache.cassandra.thrift.ConsistencyLevel.valueOf(ConsistencyLevel.java:76)
	at org.apache.cassandra.cql.CqlParser.batchUpdateStatement(CqlParser.java:1062)
	at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:232)
	at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:834)
	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:463)
	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1127)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
{code}



> CQL: Batch Updates: some consistency levels not working
> -------------------------------------------------------
>
>                 Key: CASSANDRA-2566
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2566
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.8.1
>            Reporter: Cathy Daw
>              Labels: cql
>
> Testing the batch updates, and running into some issues with different consistency levels
> _Note: hopefully not offending anyone by putting multiple bugs in one JIRA, but they
all seem related, so decided to add them in one.  After triage I can split this out, if needed._
> +*Summary*+
> * PASS: CONSISTENCY  ONE
> * PASS: CONSISTENCY  QUORUM
> * PASS: CONSISTENCY  ALL
> * CQL ERROR: CONSISTENCY ZERO
> The following were run on a single node which did not have a DC setup so the test isn't
fully accurate, but didn't expect exceptions. The following work fine for DELETE
> * THRIFT ERROR: CONSISTENCY  DCQUORUM
> * THRIFT ERROR:CONSISTENCY  DCQUORUMSYNC
> The following are not in the CQL Documentation as supported, but I saw a bug which says
we need to support them for all strategy types.  The following are also broken for DELETE.
> * CQL ERROR: CONSISTENCY  LOCAL_QUORUM
> * CQL ERROR: CONSISTENCY  EACH_QUORUM
>  
> +*Test Setup*+
> {code}
> CREATE KEYSPACE cqldb with strategy_class =  'org.apache.cassandra.locator.SimpleStrategy'
 
> and strategy_options:replication_factor=1;
> use cqldb;
> CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY, password varchar, gender varchar,

> session_token varchar, state varchar, birth_year bigint);
> INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user1', 'ch@ngem3',
'f', 'CA', '1971');
> INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user2', 'ch@ngem3',
'f', 'CA', '1972');
> INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user3', 'ch@ngem3',
'f', 'CA', '1973');
> {code}
> +*Bug Details*+
> *CONSISTENCY ZERO*
> {code}
> BEGIN BATCH USING CONSISTENCY ZERO
> UPDATE users SET state = 'TX' WHERE KEY = 'user1';
> UPDATE users SET state = 'TX' WHERE KEY = 'user2';
> UPDATE users SET state = 'TX' WHERE KEY = 'user3';
> APPLY BATCH
> cqlsh> Bad Request: line 1:30 mismatched input 'ZERO' expecting K_LEVEL
> {code}
> *CONSISTENCY LOCAL_QUORUM*
> {code}
> BEGIN BATCH USING CONSISTENCY  LOCAL_QUORUM
> UPDATE users SET state = 'UT' WHERE KEY = 'user1';
> UPDATE users SET state = 'UT' WHERE KEY = 'user2';
> UPDATE users SET state = 'UT' WHERE KEY = 'user3';
> APPLY BATCH
> cqlsh>  Bad Request: line 1:31 mismatched input 'LOCAL_QUORUM' expecting K_LEVEL
> {code}
> *CONSISTENCY EACH_QUORUM*
> {code}
> BEGIN BATCH USING CONSISTENCY  EACH_QUORUM
> UPDATE users SET state = 'TX' WHERE KEY = 'user1';
> UPDATE users SET state = 'TX' WHERE KEY = 'user2';
> UPDATE users SET state = 'TX' WHERE KEY = 'user3';
> APPLY BATCH
> cqlsh> Bad Request: line 1:31 mismatched input 'EACH_QUORUM' expecting K_LEVEL
> {code}
> *CONSISTENCY DCQUORUM*
> {code}
> cqlsh> DELETE FROM users USING CONSISTENCY DCQUORUM where KEY = 'user2' ; -- PASSES
> {code}
> {code}
> BEGIN BATCH USING CONSISTENCY  DCQUORUM
> UPDATE users SET state = 'WA' WHERE KEY = 'user1';
> UPDATE users SET state = 'WA' WHERE KEY = 'user2';
> UPDATE users SET state = 'WA' WHERE KEY = 'user3';
> APPLY BATCH	
> cqlsh> Internal application error
> ERROR 19:20:39,087 Internal error processing execute_cql_query
> java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUM
> 	at java.lang.Enum.valueOf(Enum.java:214)
> 	at org.apache.cassandra.thrift.ConsistencyLevel.valueOf(ConsistencyLevel.java:76)
> 	at org.apache.cassandra.cql.CqlParser.batchUpdateStatement(CqlParser.java:1062)
> 	at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:232)
> 	at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:834)
> 	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:463)
> 	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1127)
> 	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
> 	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:636)
> {code}
> *CONSISTENCY DCQUORUMSYNC*
> {code}
> cqlsh> DELETE FROM users USING CONSISTENCY DCQUORUMSYNC where KEY = 'user2' ; -- PASSES
> {code}
> {code}
> BEGIN BATCH USING CONSISTENCY  DCQUORUMSYNC
> UPDATE users SET state = 'NY' WHERE KEY = 'user1';
> UPDATE users SET state = 'NY' WHERE KEY = 'user2';
> UPDATE users SET state = 'NY' WHERE KEY = 'user3';
> APPLY BATCH	
> cqlsh> Internal application error
> ERROR 19:22:19,482 Internal error processing execute_cql_query
> java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUMSYNC
> 	at java.lang.Enum.valueOf(Enum.java:214)
> 	at org.apache.cassandra.thrift.ConsistencyLevel.valueOf(ConsistencyLevel.java:76)
> 	at org.apache.cassandra.cql.CqlParser.batchUpdateStatement(CqlParser.java:1062)
> 	at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:232)
> 	at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:834)
> 	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:463)
> 	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1127)
> 	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
> 	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:636)
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message