Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-6813

server side ClassCastException using compact storage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.0.6
    • None
    • None
    • Normal

    Description

      The following snippet fails on the current 2.0 branch and succeeds on the 2.1 branch.

      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;
      

      On the 2.0 branch a ClassCastException is logged in the server log file.

      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)
      

      Attachments

        1. 6813.txt
          2 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            pkendall Paul Kendall
            Sylvain Lebresne
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: