cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifesdj...@apache.org
Subject cassandra git commit: Ninja: Fix ColumnFilter backward compatibility with 3014 version
Date Fri, 16 Jun 2017 15:37:46 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 4c70f32b3 -> 6608bea00


Ninja: Fix ColumnFilter backward compatibility with 3014 version

Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6608bea0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6608bea0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6608bea0

Branch: refs/heads/trunk
Commit: 6608bea00f4c96a4c587efd4c0b0262aca7e56e1
Parents: 4c70f32
Author: Alex Petrov <oleksandr.petrov@gmail.com>
Authored: Thu Jun 15 22:39:16 2017 +0200
Committer: Alex Petrov <oleksandr.petrov@gmail.com>
Committed: Fri Jun 16 17:37:22 2017 +0200

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/filter/ColumnFilter.java      | 2 +-
 test/unit/org/apache/cassandra/db/filter/ColumnFilterTest.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6608bea0/src/java/org/apache/cassandra/db/filter/ColumnFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/filter/ColumnFilter.java b/src/java/org/apache/cassandra/db/filter/ColumnFilter.java
index dcd93e8..58c4cec 100644
--- a/src/java/org/apache/cassandra/db/filter/ColumnFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/ColumnFilter.java
@@ -533,7 +533,7 @@ public class ColumnFilter
         @VisibleForTesting
         public static ColumnFilter maybeUpdateForBackwardCompatility(ColumnFilter selection,
int version)
         {
-            if (version > MessagingService.VERSION_30 || !selection.fetchAllRegulars ||
selection.queried == null)
+            if (version > MessagingService.VERSION_3014 || !selection.fetchAllRegulars
|| selection.queried == null)
                 return selection;
 
             // The meaning of fetchAllRegulars changed (at least when queried != null) due
to CASSANDRA-12768: in

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6608bea0/test/unit/org/apache/cassandra/db/filter/ColumnFilterTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/filter/ColumnFilterTest.java b/test/unit/org/apache/cassandra/db/filter/ColumnFilterTest.java
index eee2ad5..fa08950 100644
--- a/test/unit/org/apache/cassandra/db/filter/ColumnFilterTest.java
+++ b/test/unit/org/apache/cassandra/db/filter/ColumnFilterTest.java
@@ -53,7 +53,7 @@ public class ColumnFilterTest
 
         columnFilter = ColumnFilter.all(metadata);
         testRoundTrip(columnFilter, ColumnFilter.Serializer.maybeUpdateForBackwardCompatility(columnFilter,
MessagingService.VERSION_30), metadata, MessagingService.VERSION_30);
-        testRoundTrip(ColumnFilter.all(metadata), metadata, MessagingService.VERSION_3014);
+        testRoundTrip(columnFilter, ColumnFilter.Serializer.maybeUpdateForBackwardCompatility(columnFilter,
MessagingService.VERSION_3014), metadata, MessagingService.VERSION_3014);
         testRoundTrip(ColumnFilter.all(metadata), metadata, MessagingService.VERSION_40);
 
         testRoundTrip(ColumnFilter.selection(metadata.regularAndStaticColumns().without(v1)),
metadata, MessagingService.VERSION_30);
@@ -62,7 +62,7 @@ public class ColumnFilterTest
 
         columnFilter = ColumnFilter.selection(metadata, metadata.regularAndStaticColumns().without(v1));
         testRoundTrip(columnFilter, ColumnFilter.Serializer.maybeUpdateForBackwardCompatility(columnFilter,
MessagingService.VERSION_30), metadata, MessagingService.VERSION_30);
-        testRoundTrip(ColumnFilter.selection(metadata, metadata.regularAndStaticColumns().without(v1)),
metadata, MessagingService.VERSION_3014);
+        testRoundTrip(columnFilter, ColumnFilter.Serializer.maybeUpdateForBackwardCompatility(columnFilter,
MessagingService.VERSION_3014), metadata, MessagingService.VERSION_3014);
         testRoundTrip(ColumnFilter.selection(metadata, metadata.regularAndStaticColumns().without(v1)),
metadata, MessagingService.VERSION_40);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message