Ivo Meißner created CASSANDRA-4394:
--------------------------------------

             Summary: Secondary index data gone after restart 
                 Key: CASSANDRA-4394
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4394
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.1.1
            Reporter: Ivo Meißner
             Fix For: 1.1.2


When the cassandra service starts, the secondary index data 
won't load and throws the following error during startup: 

INFO 08:29:42,127 Opening 
/var/myproject/cassandra/data/mykeyspace/group_admin/mykeyspace-group_admin.group_admin_groupId_idx-hd-1
 (20808 bytes)
ERROR 08:29:42,159 Exception in thread Thread[SSTableBatchOpen:1,5,main]
java.lang.ClassCastException: java.math.BigInteger cannot be cast to 
java.nio.ByteBuffer
        at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
        at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
        at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
        at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
        at java.util.TreeMap.getEntry(TreeMap.java:328)
        at java.util.TreeMap.containsKey(TreeMap.java:209)
        at java.util.TreeSet.contains(TreeSet.java:217)
        at 
org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:396)
        at 
org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:187)
        at 
org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:225)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)


When the service starts data can still be selected from the column family, but 
not using the secondary index. 
After "nodetool rebuild_index" the secondary index works fine again 
until the next restart. 

Occurs with the following column family definition: 

{code}
create column family group_admin with
  comparator = UTF8Type and
  key_validation_class = UTF8Type and
  column_metadata = [
    {column_name: id, validation_class: UTF8Type},
    {column_name: userId, validation_class: BytesType, index_type: KEYS},
    {column_name: groupId, validation_class: TimeUUIDType, index_type: KEYS}
  ];
{code}

Perhaps related to: 
CASSANDRA-3954
CASSANDRA-4197

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to