Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB68E10D68 for ; Wed, 4 Dec 2013 11:56:44 +0000 (UTC) Received: (qmail 23922 invoked by uid 500); 4 Dec 2013 11:56:38 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 23879 invoked by uid 500); 4 Dec 2013 11:56:36 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 23860 invoked by uid 99); 4 Dec 2013 11:56:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2013 11:56:35 +0000 Date: Wed, 4 Dec 2013 11:56:35 +0000 (UTC) From: =?utf-8?Q?Julien_Aym=C3=A9_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-6447) SELECT someColumns FROM table results in AssertionError in AbstractQueryPager.discardFirst MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-6447?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Aym=C3=A9 updated CASSANDRA-6447: ----------------------------------- Attachment: stacktrace.txt the stacktrace > SELECT someColumns FROM table results in AssertionError in AbstractQueryP= ager.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=C3=A9 > 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 =3D session.execute("SELECT key, col1, col2, col3 FROM m= ytable"); > 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=3DONE, vals= =3D[], skip=3Dfalse, psize=3D5000, state=3Dnull, serialCl=3DONE])}} > * 2nd: {{QUERY SELECT key, col1, col2, col3 FROM mytable([cl=3DONE, vals= =3D[], skip=3Dfalse, psize=3D5000, state=3Djava.nio.HeapByteBuffer[pos=3D24= lim=3D80 cap=3D410474], serialCl=3DONE])}} > On the first message, everything is fine, and the server returns 5000 row= s. > On the second message, paging is in progress, and the server fails in Abs= tractQueryPager.discardFirst: AssertionError (stack trace attached). > Here is some more info (step by step debugging on reception of 2nd messag= e): > {code} > AbstractQueryPager.fetchPage(int): > * pageSize=3D5000, currentPageSize=3D5001, rows size=3D5002, liveCount=3D= 5001 > * containsPreviousLast(rows.get(0)) returns true > -> AbstractQueryPager.discardFirst(List): > * rows size=3D5002 > * first=3DTreeMapBackedSortedColumns[with TreeMap size=3D1] > -> AbstractQueryPager.discardHead(ColumnFamily, ...): > * counter =3D ColumnCounter$GroupByPrefix > * iter.hasNext() returns true (TreeMap$ValueIterator with TreeMap size=3D= 1) > * Column c =3D DeletedColumn > * counter.count() -> c.isLive returns false (c is DeletedColumn) > * counter.live() =3D 0 > * iter.hasNext() returns false > * Math.min(0, toDiscard=3D=3D1) returns 0 > <- AbstractQueryPager.discardFirst(List): > discarded =3D 0; > {code} > -> assert discarded =3D=3D 1 *throws AssertionError* -- This message was sent by Atlassian JIRA (v6.1#6144)