cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-6813) server side ClassCastException using compact storage
Date Fri, 07 Mar 2014 11:03:44 GMT

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

Sylvain Lebresne updated CASSANDRA-6813:
----------------------------------------

    Attachment: 6813.txt

We indeed were not handling compact tables properly for CAS, relatively trivial patch attached.
I've pushed a dtest for this too.

> server side ClassCastException using compact storage
> ----------------------------------------------------
>
>                 Key: CASSANDRA-6813
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6813
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Paul Kendall
>             Fix For: 2.0.6
>
>         Attachments: 6813.txt
>
>
> The following snippet fails on the current 2.0 branch and succeeds on the 2.1 branch.
> {code}
> create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
1};
> USE test ;
> CREATE TABLE lock (
> 	partition text,
> 	key text,
> 	owner text,
> 	PRIMARY KEY ((partition), key)
> ) WITH COMPACT STORAGE;
> INSERT INTO lock(partition,key,owner) VALUES ('a','b',null) ;
> UPDATE lock SET owner='z' WHERE partition='a' AND key='b' IF owner=null;
> {code}
> On the 2.0 branch a ClassCastException is logged in the server log file.
> {code}
> ERROR [ReadStage:244] 2014-03-07 09:38:47,227 CassandraDaemon.java (line 196) Exception
in thread Thread[ReadStage:244,5,main]
> java.lang.RuntimeException: java.lang.ClassCastException: org.apache.cassandra.db.marshal.BytesType
cannot be cast to org.apache.cassandra.db.marshal.CompositeType
> 	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1900)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:744)
> Caused by: java.lang.ClassCastException: org.apache.cassandra.db.marshal.BytesType cannot
be cast to org.apache.cassandra.db.marshal.CompositeType
> 	at org.apache.cassandra.db.filter.SliceQueryFilter.columnCounter(SliceQueryFilter.java:231)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message