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

Dave Decicco commented on CASSANDRA-9659:
-----------------------------------------

Hi Benjamin,

I did a bit more digging today with version 2.1.3 and had some interesting 
findings I'm hoping you can corroborate or make sense of.
We are going to be testing if 2.1.5 fixes the problem but won't be at that 
point for a couple of days.

The issue appears to be with setting the PagingState property of the 
Cassandra.RowSet class in the DataStax 2.1.0 version of the C# driver.  In the 
particular queries I've outlined in previous emails, we have to make 2 separate 
queries, for different companyid values, and then combine the results for 
display on the UI.  The application though uses the PagingState result from the 
1st query when making the 2nd query, which causes the exception from what I can 
tell. (Highlighted text on line 63 of the CqlProxyInvocationHandler attachment) 
 The reason we have to make 2 queries is that the IN operation on the companyid 
column cannot be combined with the secondary index for the serialnumber column 
of the raw message table (see attachment "Multiple companyid IN clause with 
secondary index failure" for the CQL error message)  Instead of removing the 
"serialnumber = 201203" clause from the query, we instead make 2 calls; one for 
the first companyid and another for the secondary companyid so we have a strict 
equality on the primary key column and can use the secondary index of 
serialnumber to filter the results.  Does this make sense that the PagingState 
is set incorrectly when making the 2nd database call and would cause the issue?

If the above is true, then I have a question about combining the output of 
multiple resultsets and the PagingState.  
If an application uses paging and the output of a single page is made of 
multiple Cassandra queries, how can the PagingState be actually set to retrieve 
the next set of results for the next page?  Would a page map of companyid and 
PagingState need to be maintained in the application for each page of results?

If this is not the appropriate forum for this question, please let me know.

Please let me know if you have any questions/comments.

Thanks,
 



> ServerErrorException: java.lang.AssertionError
> ----------------------------------------------
>
>                 Key: CASSANDRA-9659
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9659
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: CentOS 6.5
> Cassandra 2.1.3
>            Reporter: Dave Decicco
>            Assignee: Benjamin Lerer
>             Fix For: 2.1.x
>
>         Attachments: CqlProxyInvocationHandler sets PagingState AFTER 1st 
> company call for results.PNG, Multiple companyid IN clause with secondary 
> index failure.PNG, rawmessage column family.PNG, trackingdevice column 
> family.PNG
>
>
> An issue exists where a java.lang.AssertionError occurs for a select number 
> of read queries from Cassandra within our application.
> It was suggested that a ticket be created to see if the error below is the 
> same as CASSANDRA-8949 which was fixed in version 2.1.5.
> Here is a portion of the Cassandra log file where the exception occurs:
> {code}
> INFO  [MemtableFlushWriter:50153] 2015-06-23 13:11:17,517 Memtable.java:385 - 
> Completed flushing; nothing needed to be retained.  Commitlog position was 
> ReplayPosition(segmentId=1425054853780, position=8886361)
> ERROR [SharedPool-Worker-1] 2015-06-23 13:11:29,047 Message.java:538 - 
> Unexpected exception during request; channel = [id: 0x8f1ca59e, 
> /10.30.43.68:33717 => /10.30.43.146:9042]javaa.lang.AssertionError: 
> [DecoratedKey(5747358200379796162, 
> 64623465383566662d653235382d343130352d616131612d346230396635353965666364),DecoratedKey(3303996443194009861,
>  34623632646562322d626234332d346661642d613263312d356334613233633037353932)]
>         at org.apache.cassandra.dht.Bounds.<init>(Bounds.java:41) 
> ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at org.apache.cassandra.dht.Bounds.<init>(Bounds.java:34) 
> ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.makeIncludingKeyBounds(RangeSliceQueryPager.java:123)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.queryNextPage(RangeSliceQueryPager.java:74)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.service.pager.AbstractQueryPager.fetchPage(AbstractQueryPager.java:87)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.fetchPage(RangeSliceQueryPager.java:37)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:219)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:62)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:493)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:134)
>  ~[apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
>  [apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
>  [apache-cassandra-2.1.3.jar:2.1.3]
>         at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown 
> Source) [na:1.7.0_76]
>         at 
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
>  [apache-cassandra-2.1.3.jar:2.1.3]
>         at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
> [apache-cassandra-2.1.3.jar:2.1.3]
>         at java.lang.Thread.run(Unknown Source) [na:1.7.0_76]
> INFO  [BatchlogTasks:1] 2015-06-23 13:12:17,521 ColumnFamilyStore.java:877 - 
> Enqueuing flush of batchlog: 27641 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:50154] 2015-06-23 13:12:17,522 Memtable.java:339 - 
> Writing Memtable-batchlog@297832842(22529 serialized bytes, 40 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:50154] 2015-06-23 13:12:17,523 Memtable.java:385 - 
> Completed flushing; nothing needed to be retained.  Commitlog position was 
> ReplayPosition(segmentId=1425054853780, position=8948299)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to