You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Julien Aymé (JIRA)" <ji...@apache.org> on 2013/12/04 12:56:35 UTC
[jira] [Updated] (CASSANDRA-6447) SELECT someColumns FROM table
results in AssertionError in AbstractQueryPager.discardFirst
[ https://issues.apache.org/jira/browse/CASSANDRA-6447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julien Aymé updated CASSANDRA-6447:
-----------------------------------
Attachment: stacktrace.txt
the stacktrace
> SELECT someColumns FROM table results in AssertionError in AbstractQueryPager.discardFirst
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-6447
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6447
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Environment: Cluster: single node server (ubuntu)
> Cassandra version: 2.0.3 (server/client)
> Client: Datastax cassandra-driver-core 2.0.0-rc1
> Reporter: Julien Aymé
> Attachments: stacktrace.txt
>
>
> I have a query which must read all the rows from the table:
> Query: "SELECT key, col1, col2, col3 FROM mytable"
> Here is the corresponding code (this is using datastax driver):
> {code}
> ResultSet result = session.execute("SELECT key, col1, col2, col3 FROM mytable");
> for (Row row : result) {
> // do some work with row
> }
> {code}
> Messages sent from the client to Cassandra:
> * 1st: {{QUERY SELECT key, col1, col2, col3 FROM mytable([cl=ONE, vals=[], skip=false, psize=5000, state=null, serialCl=ONE])}}
> * 2nd: {{QUERY SELECT key, col1, col2, col3 FROM mytable([cl=ONE, vals=[], skip=false, psize=5000, state=java.nio.HeapByteBuffer[pos=24 lim=80 cap=410474], serialCl=ONE])}}
> On the first message, everything is fine, and the server returns 5000 rows.
> On the second message, paging is in progress, and the server fails in AbstractQueryPager.discardFirst: AssertionError (stack trace attached).
> Here is some more info (step by step debugging on reception of 2nd message):
> {code}
> AbstractQueryPager.fetchPage(int):
> * pageSize=5000, currentPageSize=5001, rows size=5002, liveCount=5001
> * containsPreviousLast(rows.get(0)) returns true
> -> AbstractQueryPager.discardFirst(List<Row>):
> * rows size=5002
> * first=TreeMapBackedSortedColumns[with TreeMap size=1]
> -> AbstractQueryPager.discardHead(ColumnFamily, ...):
> * counter = ColumnCounter$GroupByPrefix
> * iter.hasNext() returns true (TreeMap$ValueIterator with TreeMap size=1)
> * Column c = DeletedColumn
> * counter.count() -> c.isLive returns false (c is DeletedColumn)
> * counter.live() = 0
> * iter.hasNext() returns false
> * Math.min(0, toDiscard==1) returns 0
> <- AbstractQueryPager.discardFirst(List<Row>):
> discarded = 0;
> {code}
> -> assert discarded == 1 *throws AssertionError*
--
This message was sent by Atlassian JIRA
(v6.1#6144)