Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 07972200B43 for ; Wed, 29 Jun 2016 02:38:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 04966160A6C; Wed, 29 Jun 2016 00:38:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1BEB9160A56 for ; Wed, 29 Jun 2016 02:38:10 +0200 (CEST) Received: (qmail 3363 invoked by uid 500); 29 Jun 2016 00:38:10 -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 3348 invoked by uid 99); 29 Jun 2016 00:38:10 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2016 00:38:10 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 18F482C0283 for ; Wed, 29 Jun 2016 00:38:10 +0000 (UTC) Date: Wed, 29 Jun 2016 00:38:10 +0000 (UTC) From: "Sharvanath Pathak (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-12107) Fix range scans for table with live static rows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 29 Jun 2016 00:38:12 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sharvanath Pathak updated CASSANDRA-12107: ------------------------------------------ Description: We were seeing some weird behaviour with limit based scan queries. In particular, we see the following: {noformat} $ cqlsh -k sd -e "consistency local_quorum; SELECT uuid, token(uuid) FROM files WHERE token(uuid) >= token('6b470c3e43ee06d1') limit 2" Consistency level set to LOCAL_QUORUM. uuid | system.token(uuid) ------------------+---------------------- 6b470c3e43ee06d1 | -9218823070349964862 484b091ca97803cd | -8954822859271125729 (2 rows) $ cqlsh -k sd -e "consistency local_quorum; SELECT uuid, token(uuid) FROM files WHERE token(uuid) > token('6b470c3e43ee06d1') limit 1" Consistency level set to LOCAL_QUORUM. uuid | system.token(uuid) ------------------+---------------------- c348aaec2f1e4b85 | -9218781105444826588 {noformat} In the table uuid is partition key, and it has a clustering key as well. So the uuid "c348aaec2f1e4b85" should be the second one in the limit query. After some investigation, it seems to me like the issue is in the way DataLimits handles static rows. Here is a patch for trunk (https://github.com/sharvanath/cassandra/commit/9a460d40e55bd7e3604d987ed4df5c8c2e03ffdc) which seems to fix it for me. Please take a look, seems like a pretty critical issue to me. I have forked the dtests for it as well. However, since trunk has some failures already, I'm not fully sure how to infer the results. http://cassci.datastax.com/view/Dev/view/sharvanath/job/sharvanath-fixScan-dtest/ http://cassci.datastax.com/view/Dev/view/sharvanath/job/sharvanath-fixScan-testall/ was: We were seeing some weird behaviour with limit based scan queries. In particular, we see the following: {noformat} $ cqlsh -k sd -e "consistency local_quorum; SELECT uuid, token(uuid) FROM files WHERE token(uuid) >= token('6b470c3e43ee06d1') limit 2" Consistency level set to LOCAL_QUORUM. uuid | system.token(uuid) ------------------+---------------------- 6b470c3e43ee06d1 | -9218823070349964862 484b091ca97803cd | -8954822859271125729 (2 rows) $ cqlsh -k sd -e "consistency local_quorum; SELECT uuid, token(uuid) FROM files WHERE token(uuid) > token('6b470c3e43ee06d1') limit 1" Consistency level set to LOCAL_QUORUM. uuid | system.token(uuid) ------------------+---------------------- c348aaec2f1e4b85 | -9218781105444826588 {noformat} In the table uuid is partition key, and it has a clustering key as well. So the uuid "c348aaec2f1e4b85" should be the second one in the limit query. After some investigation, it seems to me like the issue is in the way DataLimits handles static rows. Here is a patch (https://github.com/sharvanath/cassandra/commit/9a460d40e55bd7e3604d987ed4df5c8c2e03ffdc) which seems to fix it for me. Please take a look, seems like a pretty critical issue to me. I have forked the dtests for it as well, but since trunk has some failure I'm not fully sure how to infer the results. http://cassci.datastax.com/view/Dev/view/sharvanath/job/sharvanath-fixScan-dtest/ http://cassci.datastax.com/view/Dev/view/sharvanath/job/sharvanath-fixScan-testall/ > Fix range scans for table with live static rows > ----------------------------------------------- > > Key: CASSANDRA-12107 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12107 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Sharvanath Pathak > Fix For: 3.0.8 > > > We were seeing some weird behaviour with limit based scan queries. In particular, we see the following: > {noformat} > $ cqlsh -k sd -e "consistency local_quorum; SELECT uuid, token(uuid) FROM files WHERE token(uuid) >= token('6b470c3e43ee06d1') limit 2" > Consistency level set to LOCAL_QUORUM. > uuid | system.token(uuid) > ------------------+---------------------- > 6b470c3e43ee06d1 | -9218823070349964862 > 484b091ca97803cd | -8954822859271125729 > (2 rows) > $ cqlsh -k sd -e "consistency local_quorum; SELECT uuid, token(uuid) FROM files WHERE token(uuid) > token('6b470c3e43ee06d1') limit 1" > Consistency level set to LOCAL_QUORUM. > uuid | system.token(uuid) > ------------------+---------------------- > c348aaec2f1e4b85 | -9218781105444826588 > {noformat} > In the table uuid is partition key, and it has a clustering key as well. > So the uuid "c348aaec2f1e4b85" should be the second one in the limit query. After some investigation, it seems to me like the issue is in the way DataLimits handles static rows. Here is a patch for trunk (https://github.com/sharvanath/cassandra/commit/9a460d40e55bd7e3604d987ed4df5c8c2e03ffdc) which seems to fix it for me. Please take a look, seems like a pretty critical issue to me. > I have forked the dtests for it as well. However, since trunk has some failures already, I'm not fully sure how to infer the results. > http://cassci.datastax.com/view/Dev/view/sharvanath/job/sharvanath-fixScan-dtest/ > http://cassci.datastax.com/view/Dev/view/sharvanath/job/sharvanath-fixScan-testall/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)