[
https://issues.apache.org/jira/browse/CASSANDRA-8108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tyler Hobbs updated CASSANDRA-8108:
-----------------------------------
Attachment: 8108.txt
There were a couple of problems. The first was that when the cell name in the
paging state was null, an empty composite would be used, which isn't a valid
CellName. Switching to a Composite for the slice start fixed that. The second
problem was that the limit for individual slice queries would be overwritten
with the page size; in the case of a DISTINCT query with static columns, the
limit for each slice query should be 1.
I'm not 100% confident that this is the best fix, so please review carefully.
I also added some documentation and did some minor renaming in
AbstractQueryPager.
Besides 8108.txt, there's also a
[branch|https://github.com/thobbs/cassandra/tree/CASSANDRA-8108] and a new
[dtest|https://github.com/thobbs/cassandra-dtest/tree/CASSANDRA-8108]. I also
ran the python driver paging tests and the tests from the [paging dtests
branch|https://github.com/riptano/cassandra-dtest/pull/93] to check for
regressions.
> ClassCastException in AbstractCellNameType
> ------------------------------------------
>
> Key: CASSANDRA-8108
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8108
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Environment: Cassandra 2.1.0
> Datastax AMI on EC2 (Ubuntu Linux)
> Reporter: David Hearnden
> Assignee: Tyler Hobbs
> Fix For: 2.1.1
>
> Attachments: 8108.txt
>
>
> {noformat}
> java.lang.ClassCastException:
> org.apache.cassandra.db.composites.Composites$EmptyComposite cannot be cast
> to org.apache.cassandra.db.composites.CellName
> at
> org.apache.cassandra.db.composites.AbstractCellNameType.cellFromByteBuffer(AbstractCellNameType.java:170)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.service.pager.SliceQueryPager.<init>(SliceQueryPager.java:57)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.service.pager.MultiPartitionPager.makePager(MultiPartitionPager.java:84)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.service.pager.MultiPartitionPager.<init>(MultiPartitionPager.java:68)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.service.pager.QueryPagers.pager(QueryPagers.java:101)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.service.pager.QueryPagers.pager(QueryPagers.java:125)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:215)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:60)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:187)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:413)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:133)
> ~[apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:422)
> [apache-cassandra-2.1.0.jar:2.1.0]
> at
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:318)
> [apache-cassandra-2.1.0.jar:2.1.0]
> at
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103)
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
> at
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
> at
> io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:31)
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
> at
> io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:323)
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> [na:1.7.0_51]
> at
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:163)
> [apache-cassandra-2.1.0.jar:2.1.0]
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:103)
> [apache-cassandra-2.1.0.jar:2.1.0]
> at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)