You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/11/03 16:17:12 UTC
[jira] [Created] (CASSANDRA-4903) index query on composite columns
are broken
Jonathan Ellis created CASSANDRA-4903:
-----------------------------------------
Summary: index query on composite columns are broken
Key: CASSANDRA-4903
URL: https://issues.apache.org/jira/browse/CASSANDRA-4903
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Sylvain Lebresne
Fix For: 1.2.0 beta 2
{noformat}
cqlsh:keyspace1> create table indexed1 (key int primary key, i int, j int);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (0, 1, 2);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (1, 1, 3);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (2, 1, 4);
cqlsh:keyspace1> create index on indexed1(i);
cqlsh:keyspace1> select * from indexed1 where i = 1;
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4903) CompositeType.getString is
broken
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490091#comment-13490091 ]
Jonathan Ellis commented on CASSANDRA-4903:
-------------------------------------------
Testing:
{noformat}
cqlsh:keyspace1> create table indexed1 (key int primary key, i int, j int);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (0, 1, 2);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (1, 1, 3);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (2, 1, 4);
cqlsh:keyspace1> create index on indexed1(i);
cqlsh:keyspace1> select * from indexed1 where i = 1;
{noformat}
> CompositeType.getString is broken
> ---------------------------------
>
> Key: CASSANDRA-4903
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4903
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.2.0
>
>
> Adding this line to the start of getIndexedIterator causes exceptions:
> {code}
> if (logger.isDebugEnabled())
> logger.debug("Most-selective indexed predicate is on {}", baseCfs.getComparator().getString(primary.column_name));
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4903) CompositeType.getString is broken
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-4903:
--------------------------------------
Comment: was deleted
(was: (this does work when WITH COMPACT STORAGE is added to the CREATE TABLE.))
> CompositeType.getString is broken
> ---------------------------------
>
> Key: CASSANDRA-4903
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4903
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.2.0
>
>
> Adding this line to the start of getIndexedIterator causes exceptions:
> {code}
> if (logger.isDebugEnabled())
> logger.debug("Most-selective indexed predicate is on {}", baseCfs.getComparator().getString(primary.column_name));
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4903) CompositeType.getString is broken
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-4903:
--------------------------------------
Description:
Adding this line to the start of getIndexedIterator causes exceptions:
{code}
if (logger.isDebugEnabled())
logger.debug("Most-selective indexed predicate is on {}", baseCfs.getComparator().getString(primary.column_name));
{code}
was:
{noformat}
cqlsh:keyspace1> create table indexed1 (key int primary key, i int, j int);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (0, 1, 2);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (1, 1, 3);
cqlsh:keyspace1> insert into indexed1(key, i, j) values (2, 1, 4);
cqlsh:keyspace1> create index on indexed1(i);
cqlsh:keyspace1> select * from indexed1 where i = 1;
{noformat}
Priority: Minor (was: Major)
Affects Version/s: (was: 1.2.0 beta 1)
Fix Version/s: (was: 1.2.0 beta 2)
1.2.0
Summary: CompositeType.getString is broken (was: index query on composite columns are broken)
> CompositeType.getString is broken
> ---------------------------------
>
> Key: CASSANDRA-4903
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4903
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.2.0
>
>
> Adding this line to the start of getIndexedIterator causes exceptions:
> {code}
> if (logger.isDebugEnabled())
> logger.debug("Most-selective indexed predicate is on {}", baseCfs.getComparator().getString(primary.column_name));
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4903) index query on composite
columns are broken
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490035#comment-13490035 ]
Jonathan Ellis commented on CASSANDRA-4903:
-------------------------------------------
(this does work when WITH COMPACT STORAGE is added to the CREATE TABLE.)
> index query on composite columns are broken
> -------------------------------------------
>
> Key: CASSANDRA-4903
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4903
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0 beta 1
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Fix For: 1.2.0 beta 2
>
>
> {noformat}
> cqlsh:keyspace1> create table indexed1 (key int primary key, i int, j int);
> cqlsh:keyspace1> insert into indexed1(key, i, j) values (0, 1, 2);
> cqlsh:keyspace1> insert into indexed1(key, i, j) values (1, 1, 3);
> cqlsh:keyspace1> insert into indexed1(key, i, j) values (2, 1, 4);
> cqlsh:keyspace1> create index on indexed1(i);
> cqlsh:keyspace1> select * from indexed1 where i = 1;
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4903) index query on composite
columns are broken
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490033#comment-13490033 ]
Jonathan Ellis commented on CASSANDRA-4903:
-------------------------------------------
{noformat}
ERROR [ReadStage:59] 2012-11-03 10:13:20,031 CassandraDaemon.java (line 132) Exception in thread Thread[ReadStage:59,5,main]
java.lang.RuntimeException: java.nio.BufferUnderflowException
at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1481)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
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:680)
Caused by: java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:472)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:117)
at org.apache.cassandra.db.marshal.AbstractCompositeType.getShortLength(AbstractCompositeType.java:37)
at org.apache.cassandra.db.marshal.AbstractCompositeType.getWithShortLength(AbstractCompositeType.java:59)
at org.apache.cassandra.db.marshal.AbstractCompositeType.getString(AbstractCompositeType.java:226)
at org.apache.cassandra.db.index.composites.CompositesSearcher.getIndexedIterator(CompositesSearcher.java:95)
at org.apache.cassandra.db.index.composites.CompositesSearcher.search(CompositesSearcher.java:84)
at org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:549)
at org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1453)
at org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:44)
at org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1063)
at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1477)
... 6 more
{noformat}
> index query on composite columns are broken
> -------------------------------------------
>
> Key: CASSANDRA-4903
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4903
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0 beta 1
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Fix For: 1.2.0 beta 2
>
>
> {noformat}
> cqlsh:keyspace1> create table indexed1 (key int primary key, i int, j int);
> cqlsh:keyspace1> insert into indexed1(key, i, j) values (0, 1, 2);
> cqlsh:keyspace1> insert into indexed1(key, i, j) values (1, 1, 3);
> cqlsh:keyspace1> insert into indexed1(key, i, j) values (2, 1, 4);
> cqlsh:keyspace1> create index on indexed1(i);
> cqlsh:keyspace1> select * from indexed1 where i = 1;
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-4903) CompositeType.getString is
broken
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-4903.
---------------------------------------
Resolution: Invalid
Fix Version/s: (was: 1.2.0)
Assignee: (was: Sylvain Lebresne)
Need to use just a part of the comparator here
> CompositeType.getString is broken
> ---------------------------------
>
> Key: CASSANDRA-4903
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4903
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Priority: Minor
>
> Adding this line to the start of getIndexedIterator causes exceptions:
> {code}
> if (logger.isDebugEnabled())
> logger.debug("Most-selective indexed predicate is on {}", baseCfs.getComparator().getString(primary.column_name));
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira