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 DC20B19390 for ; Thu, 28 Apr 2016 07:56:14 +0000 (UTC) Received: (qmail 98016 invoked by uid 500); 28 Apr 2016 07:56:14 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 97934 invoked by uid 500); 28 Apr 2016 07:56:14 -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 97122 invoked by uid 99); 28 Apr 2016 07:56:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Apr 2016 07:56:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 646852C1F6A for ; Thu, 28 Apr 2016 07:56:13 +0000 (UTC) Date: Thu, 28 Apr 2016 07:56:13 +0000 (UTC) From: "Varun Barala (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-11679) Cassandra Driver returns different number of results depending on fetchsize 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-11679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Varun Barala updated CASSANDRA-11679: ------------------------------------- Description: I'm trying to fetch all distinct keys from a CF using cassandra-driver (2.1.7.1) and I observed some strange behavior :- The total distinct rows are 498 so If I perform the query get All distinctKeys It return 503 instead of 498(five keys twice). But If I define the fetch size in select statement more than 498 then it returns exact 498 rows. And If I execute same statement on Dev-center it returns 498 rows. ''' Table Schema:- ---------------------- CREATE TABLE sample ( pk1 text, pk2 text, row_id uuid, value blob, PRIMARY KEY (( pk1, pk2)) ) WITH bloom_filter_fp_chance = 0.01 AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}' AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'} AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND dclocal_read_repair_chance = 0.1 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair_chance = 0.0 AND speculative_retry = '99.0PERCENTILE'; ''' ''' query :- ------------ SELECT DISTINCT pk2, pk1 FROM sample LIMIT 2147483647; ''' was: I'm trying to fetch all distinct keys from a CF using cassandra-driver (2.1.7.1) and I observed some strange behavior :- The total distinct rows are 498 so If I perform the query get All distinctKeys It return 503 instead of 498(five keys twice). But If I define the fetch size in select statement more than 498 then it returns exact 498 rows. And If I execute same statement on Dev-center it returns 498 rows. Table Schema:- ---------------------- CREATE TABLE sample ( pk1 text, pk2 text, row_id uuid, value blob, PRIMARY KEY (( pk1, pk2)) ) WITH bloom_filter_fp_chance = 0.01 AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}' AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'} AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND dclocal_read_repair_chance = 0.1 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair_chance = 0.0 AND speculative_retry = '99.0PERCENTILE'; query :- ------------ SELECT DISTINCT pk2, pk1 FROM sample LIMIT 2147483647; > Cassandra Driver returns different number of results depending on fetchsize > --------------------------------------------------------------------------- > > Key: CASSANDRA-11679 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11679 > Project: Cassandra > Issue Type: Bug > Components: CQL > Reporter: Varun Barala > > I'm trying to fetch all distinct keys from a CF using cassandra-driver (2.1.7.1) and I observed some strange behavior :- > The total distinct rows are 498 so If I perform the query get All distinctKeys It return 503 instead of 498(five keys twice). > But If I define the fetch size in select statement more than 498 then it returns exact 498 rows. > And If I execute same statement on Dev-center it returns 498 rows. > ''' > Table Schema:- > ---------------------- > CREATE TABLE sample ( > pk1 text, > pk2 text, > row_id uuid, > value blob, > PRIMARY KEY (( pk1, pk2)) > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}' > AND comment = '' > AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'} > AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99.0PERCENTILE'; > ''' > ''' > query :- > ------------ > SELECT DISTINCT pk2, pk1 FROM sample LIMIT 2147483647; > ''' -- This message was sent by Atlassian JIRA (v6.3.4#6332)