cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Adamson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-7722) IndexOutOfBoundsException when combining token() with PK inequality in where clause
Date Fri, 08 Aug 2014 13:44:14 GMT
Mike Adamson created CASSANDRA-7722:
---------------------------------------

             Summary: IndexOutOfBoundsException when combining token() with PK inequality
in where clause
                 Key: CASSANDRA-7722
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7722
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Mike Adamson
            Priority: Minor
             Fix For: 2.0.10


The following reproduces the problem:
{noformat}
cqlsh> create keyspace if not exists test WITH replication = {'class': 'SimpleStrategy'
, 'replication_factor': '1'};
cqlsh> create table test.cf (pk int, value text, primary key(pk));
cqlsh> select * from test.cf where token(pk) < 0 and pk > 0;
{noformat}
This causes:
{noformat}
ERROR 14:39:09,395 Error occurred during processing of message.
java.lang.IndexOutOfBoundsException
	at java.nio.Buffer.checkIndex(Buffer.java:538)
	at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:410)
	at org.apache.cassandra.utils.ByteBufferUtil.toLong(ByteBufferUtil.java:421)
	at org.apache.cassandra.dht.Murmur3Partitioner$1.fromByteArray(Murmur3Partitioner.java:162)
	at org.apache.cassandra.cql3.statements.SelectStatement.getTokenBound(SelectStatement.java:663)
	at org.apache.cassandra.cql3.statements.SelectStatement.getKeyBounds(SelectStatement.java:379)
	at org.apache.cassandra.cql3.statements.SelectStatement.getRangeCommand(SelectStatement.java:367)
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:206)
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61)
	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:158)
	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:175)
	at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201)
	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)
{noformat}
on the node and:
{noformat}
TSocket read 0 bytes
{noformat}
on the client



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

Mime
View raw message