cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7372) Exception when querying a composite-keyed table with a collection index
Date Tue, 10 Jun 2014 07:25:02 GMT

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

Sylvain Lebresne commented on CASSANDRA-7372:
---------------------------------------------

Why do we end up with an empty composite there? That feels wrong and so I'm not sure  creating
an index entry for it is the right fix. Will look more closely when I'm not on a phone.

> Exception when querying a composite-keyed table with a collection index
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-7372
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7372
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Ghais Issa
>             Fix For: 2.1.0
>
>         Attachments: CASSANDRA-2.1-7372-v2.patch
>
>
> Given the following schema:
> {code}  
> CREATE TABLE products (
>       account text,
>       id int,
>       categories set<text>,
>       PRIMARY KEY (account, id)
> );
> CREATE INDEX cat_index ON products(categories);
> {code}  
> The following query fails with an exception
> {code}
> SELECT * FROM products WHERE account = 'xyz' AND categories CONTAINS 'lmn';
> errors={}, last_host=127.0.0.1
> {code}
> The exception in cassandra's log is:
> {code}
> WARN  17:01:49 Uncaught exception on thread Thread[SharedPool-Worker-2,5,main]: {}
> java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
> 	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2015)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_25]
> 	at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:162)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:103) ~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
> Caused by: java.lang.IndexOutOfBoundsException: null
> 	at org.apache.cassandra.db.composites.Composites$EmptyComposite.get(Composites.java:60)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.db.index.composites.CompositesIndexOnCollectionKey.makeIndexColumnPrefix(CompositesIndexOnCollectionKey.java:78)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.db.index.composites.CompositesSearcher.makePrefix(CompositesSearcher.java:82)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.db.index.composites.CompositesSearcher.getIndexedIterator(CompositesSearcher.java:116)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.db.index.composites.CompositesSearcher.search(CompositesSearcher.java:68)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:589)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:2060) ~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.db.RangeSliceCommand.executeLocally(RangeSliceCommand.java:131)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1368)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2011)
~[apache-cassandra-2.1.0-rc1.jar:2.1.0-rc1]
> 	... 4 common frames omitted
> {code}
> The following query however works
> {code}
> SELECT * FROM products WHERE categories CONTAINS 'lmn';
> {code}



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

Mime
View raw message