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 3B511200B4A for ; Tue, 5 Jul 2016 18:48:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 39FE0160A2C; Tue, 5 Jul 2016 16:48:28 +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 85DEC160A60 for ; Tue, 5 Jul 2016 18:48:27 +0200 (CEST) Received: (qmail 18453 invoked by uid 500); 5 Jul 2016 16:48:26 -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 18429 invoked by uid 99); 5 Jul 2016 16:48:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2016 16:48:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5CCF3E01C1; Tue, 5 Jul 2016 16:48:26 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tylerhobbs@apache.org To: commits@cassandra.apache.org Date: Tue, 05 Jul 2016 16:48:26 -0000 Message-Id: <1404f00eaf034962875b27105f6e5d3b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/3] cassandra git commit: Apply Thrift ordering to legacy remote response where needed archived-at: Tue, 05 Jul 2016 16:48:28 -0000 Repository: cassandra Updated Branches: refs/heads/trunk 49c954e7a -> b4ac32680 Apply Thrift ordering to legacy remote response where needed Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-12123 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/22176951 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/22176951 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/22176951 Branch: refs/heads/trunk Commit: 2217695166a61f576b36993b36a6bde8c8952fde Parents: a9a6e5f Author: Tyler Hobbs Authored: Tue Jul 5 11:45:45 2016 -0500 Committer: Tyler Hobbs Committed: Tue Jul 5 11:45:45 2016 -0500 ---------------------------------------------------------------------- CHANGES.txt | 3 +++ src/java/org/apache/cassandra/db/ReadResponse.java | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/22176951/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 2df77e1..7f8a3a1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,7 @@ 3.0.9 + * Fix column ordering of results with static columns for Thrift requests in + a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of + those static columns in query results (CASSANDRA-12123) * Avoid digest mismatch with empty but static rows (CASSANDRA-12090) * Fix EOF exception when altering column type (CASSANDRA-11820) Merged from 2.2: http://git-wip-us.apache.org/repos/asf/cassandra/blob/22176951/src/java/org/apache/cassandra/db/ReadResponse.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/ReadResponse.java b/src/java/org/apache/cassandra/db/ReadResponse.java index a618aa5..8bd1be6 100644 --- a/src/java/org/apache/cassandra/db/ReadResponse.java +++ b/src/java/org/apache/cassandra/db/ReadResponse.java @@ -38,6 +38,7 @@ import org.apache.cassandra.io.util.DataInputPlus; import org.apache.cassandra.io.util.DataOutputPlus; import org.apache.cassandra.io.util.DataOutputBuffer; import org.apache.cassandra.net.MessagingService; +import org.apache.cassandra.thrift.ThriftResultsMerger; import org.apache.cassandra.utils.ByteBufferUtil; import org.apache.cassandra.utils.FBUtilities; @@ -267,15 +268,16 @@ public abstract class ReadResponse { ImmutableBTreePartition partition = toReturn.get(idx++); - ClusteringIndexFilter filter = command.clusteringIndexFilter(partition.partitionKey()); // Pre-3.0, we didn't have a way to express exclusivity for non-composite comparators, so all slices were // inclusive on both ends. If we have exclusive slice ends, we need to filter the results here. if (!command.metadata().isCompound()) - return filter.filter(partition.sliceableUnfilteredIterator(command.columnFilter(), filter.isReversed())); + return ThriftResultsMerger.maybeWrap( + filter.filter(partition.sliceableUnfilteredIterator(command.columnFilter(), filter.isReversed())), command.nowInSec()); - return partition.unfilteredIterator(command.columnFilter(), Slices.ALL, filter.isReversed()); + return ThriftResultsMerger.maybeWrap( + partition.unfilteredIterator(command.columnFilter(), Slices.ALL, filter.isReversed()), command.nowInSec()); } }; }