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 EE971187D2 for ; Tue, 23 Feb 2016 15:12:24 +0000 (UTC) Received: (qmail 91086 invoked by uid 500); 23 Feb 2016 15:12:18 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 91024 invoked by uid 500); 23 Feb 2016 15:12:18 -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 90808 invoked by uid 99); 23 Feb 2016 15:12:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2016 15:12:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2B0122C1F68 for ; Tue, 23 Feb 2016 15:12:18 +0000 (UTC) Date: Tue, 23 Feb 2016 15:12:18 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-11208) Paging is broken for IN queries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-11208: --------------------------------------- Attachment: 11083-2.2.txt {{AbstractQueryPager}} was not taking into account the fact that for tables with no clustering columns there is only one row per partition. When the next page was fetched, the pager was believing that it still had to return some rows from the partition. ||utests||dtests|| |[3.0|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11208-3.0-testall/1/]|[3.0|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11208-3.0-dtest/1/]| |[trunk|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11208-trunk-testall/1/]|[trunk|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11208-trunk-dtest/1/]| The DTest PR is [here|https://github.com/riptano/cassandra-dtest/pull/820] > Paging is broken for IN queries > ------------------------------- > > Key: CASSANDRA-11208 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11208 > Project: Cassandra > Issue Type: Bug > Components: CQL > Reporter: Benjamin Lerer > Assignee: Benjamin Lerer > Attachments: 11083-2.2.txt > > > If the number of selected row is greater than the page size, C* will return some duplicates. > The problem can be reproduced with the java driver using the following code: > {code} > session = cluster.connect(); > session.execute("CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : '1'}"); > session.execute("USE test"); > session.execute("DROP TABLE IF EXISTS test"); > session.execute("CREATE TABLE test (rc int, pk int, PRIMARY KEY (pk))"); > for (int i = 0; i < 5; i++) > session.execute("INSERT INTO test (pk, rc) VALUES (?, ?);", i, i); > ResultSet rs = session.execute(session.newSimpleStatement("SELECT * FROM test WHERE pk IN (1, 2, 3)").setFetchSize(2)); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)