cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject cassandra git commit: Apply Thrift ordering to legacy remote response where needed
Date Tue, 05 Jul 2016 16:47:54 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 a9a6e5fb1 -> 221769516


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/cassandra-3.0
Commit: 2217695166a61f576b36993b36a6bde8c8952fde
Parents: a9a6e5f
Author: Tyler Hobbs <tylerlhobbs@gmail.com>
Authored: Tue Jul 5 11:45:45 2016 -0500
Committer: Tyler Hobbs <tylerlhobbs@gmail.com>
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());
                 }
             };
         }


Mime
View raw message