You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ryan McGuire (JIRA)" <ji...@apache.org> on 2014/01/29 00:19:11 UTC

[jira] [Comment Edited] (CASSANDRA-6470) ArrayIndexOutOfBoundsException on range query from client

    [ https://issues.apache.org/jira/browse/CASSANDRA-6470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13884889#comment-13884889 ] 

Ryan McGuire edited comment on CASSANDRA-6470 at 1/28/14 11:17 PM:
-------------------------------------------------------------------

I uploaded an Eclipse project (6470-reproduced.tar.gz) that reproduces this issue.

Start up a ccm cluster: 

{code}
ccm create -v git:cassandra-2.0.2
ccm create -v git:cassandra-2.0.2 test
ccm populate -n 3:3
ccm start
{code}

Then run Bug6470Client.

This code actually works with driver version 1.0.3, so I wonder if that's not the cause instead of C*...

I can also confirm that the same queries issued in cqlsh do not repro this issue.


was (Author: enigmacurry):
This is an Eclipse project that reproduces this issue.

Start up a ccm cluster: 

{code}
ccm create -v git:cassandra-2.0.2
ccm create -v git:cassandra-2.0.2 test
ccm populate -n 3:3
ccm start
{code}

Then run Bug6470Client.

This code actually works with driver version 1.0.3, so I wonder if that's not the cause instead of C*...

> ArrayIndexOutOfBoundsException on range query from client
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-6470
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6470
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Enrico Scalavino
>            Assignee: Ryan McGuire
>         Attachments: 6470-reproduced.tar.gz
>
>
> schema: 
> {noformat}
> CREATE TABLE inboxkeyspace.inboxes(user_id bigint, message_id bigint, thread_id bigint, network_id bigint, read boolean, PRIMARY KEY(user_id, message_id)) WITH CLUSTERING ORDER BY (message_id DESC);
> CREATE INDEX ON inboxkeyspace.inboxes(read);
> {noformat}
> query: 
> {noformat}
> SELECT thread_id, message_id, network_id FROM inboxkeyspace.inboxes WHERE user_id = ? AND message_id < ? AND read = ? LIMIT ? 
> {noformat}
> The query works if run via cqlsh. However, when run through the datastax client, on the client side we get a timeout exception and on the server side, the Cassandra log shows this exception: 
> {noformat}
> ERROR [ReadStage:4190] 2013-12-10 13:18:03,579 CassandraDaemon.java (line 187) Exception in thread Thread[ReadStage:4190,5,main]
> java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
>         at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1940)
>         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:722)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>         at org.apache.cassandra.db.filter.SliceQueryFilter.start(SliceQueryFilter.java:261)
>         at org.apache.cassandra.db.index.composites.CompositesSearcher.makePrefix(CompositesSearcher.java:66)
>         at org.apache.cassandra.db.index.composites.CompositesSearcher.getIndexedIterator(CompositesSearcher.java:101)
>         at org.apache.cassandra.db.index.composites.CompositesSearcher.search(CompositesSearcher.java:53)
>         at org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:537)
>         at org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1669)
>         at org.apache.cassandra.db.PagedRangeCommand.executeLocally(PagedRangeCommand.java:109)
>         at org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1423)
>         at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1936)
>         ... 3 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)