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 C72CA104B1 for ; Thu, 29 May 2014 10:55:00 +0000 (UTC) Received: (qmail 58620 invoked by uid 500); 29 May 2014 10:55:00 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 58587 invoked by uid 500); 29 May 2014 10:55:00 -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 58579 invoked by uid 99); 29 May 2014 10:55:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2014 10:55:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 362AE4F3EF; Thu, 29 May 2014 10:55:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: slebresne@apache.org To: commits@cassandra.apache.org Date: Thu, 29 May 2014 10:55:00 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/4] git commit: Fix bug with some IN queries missing results Repository: cassandra Updated Branches: refs/heads/trunk 56c2f0ab1 -> af593090b Fix bug with some IN queries missing results patch by slebresne; reviewed by thobbs for CASSANDRA-7105 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7bbeb5aa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7bbeb5aa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7bbeb5aa Branch: refs/heads/trunk Commit: 7bbeb5aa2d1064281589b98306f950550bd47e60 Parents: a374821 Author: Sylvain Lebresne Authored: Thu May 29 12:48:06 2014 +0200 Committer: Sylvain Lebresne Committed: Thu May 29 12:48:42 2014 +0200 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/cql3/statements/SelectStatement.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bbeb5aa/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index e7d7028..619c219 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,7 @@ * raise streaming phi convict threshold level (CASSANDRA-7063) * reduce garbage creation in calculatePendingRanges (CASSANDRA-7191) * exit CQLSH with error status code if script fails (CASSANDRA-6344) + * Fix bug with some IN queries missig results (CASSANDRA-7105) 1.2.16 http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bbeb5aa/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java index e058cff..02833e7 100644 --- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java @@ -626,7 +626,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache throw new InvalidRequestException(String.format("Invalid null clustering key part %s", name)); ColumnNameBuilder copy = builder.copy().add(val); // See below for why this - s.add((b == Bound.END && copy.remainingCount() > 0) ? copy.buildAsEndOfRange() : copy.build()); + s.add((eocBound == Bound.END && copy.remainingCount() > 0) ? copy.buildAsEndOfRange() : copy.build()); } return new ArrayList(s); } @@ -652,7 +652,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache // with 2ndary index is done, and with the the partition provided with an EQ, we'll end up here, and in that // case using the eoc would be bad, since for the random partitioner we have no guarantee that // builder.buildAsEndOfRange() will sort after builder.build() (see #5240). - return Collections.singletonList((bound == Bound.END && builder.remainingCount() > 0) ? builder.buildAsEndOfRange() : builder.build()); + return Collections.singletonList((eocBound == Bound.END && builder.remainingCount() > 0) ? builder.buildAsEndOfRange() : builder.build()); } private List getRequestedBound(Bound b, List variables) throws InvalidRequestException