Sam Tunnicliffe created CASSANDRA-4289:
------------------------------------------

             Summary: Secondary Indexes fail following a system restart
                 Key: CASSANDRA-4289
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4289
             Project: Cassandra
          Issue Type: Bug
          Components: Core
         Environment: Single node, trunk
            Reporter: Sam Tunnicliffe



Create a new cf with a secondary index, and queries with indexes predicates 
work fine until the server is restarted, after which they error and the 
following stacktrace is output to the log:

{code}
java.lang.ClassCastException: java.math.BigInteger cannot be cast to 
java.nio.ByteBuffer
        at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:44)
        at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:88)
        at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:1)
        at 
org.apache.cassandra.utils.IntervalTree.comparePoints(IntervalTree.java:191)
        at 
org.apache.cassandra.utils.IntervalTree.contains(IntervalTree.java:203)
        at 
org.apache.cassandra.utils.IntervalTree.access$3(IntervalTree.java:201)
        at 
org.apache.cassandra.utils.IntervalTree$IntervalNode.searchInternal(IntervalTree.java:293)
        at org.apache.cassandra.utils.IntervalTree.search(IntervalTree.java:140)
        at org.apache.cassandra.utils.IntervalTree.search(IntervalTree.java:146)
        at 
org.apache.cassandra.db.ColumnFamilyStore.markReferenced(ColumnFamilyStore.java:1259)
        at 
org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:229)
        at 
org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:65)
        at 
org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1300)
        at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1174)
        at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1104)
        at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:144)
        at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:1)
        at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140)
        at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135)
        at 
org.apache.cassandra.db.ColumnFamilyStore.filter(ColumnFamilyStore.java:1409)
        at 
org.apache.cassandra.db.index.keys.KeysSearcher.search(KeysSearcher.java:88)
        at 
org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:595)
        at 
org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1398)
        at 
org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:47)
        at 
org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:870)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.multiRangeSlice(SelectStatement.java:259)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134)
        at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:108)
        at 
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:121)
        at 
org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1236)
        at 
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542)
        at 
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:1)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
        at 
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184)
        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)
{code}

Tested with a single node setup & verified that this behaviour is only present 
in trunk, cassandra-1.0.10 works as expected.


--
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