cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject cassandra git commit: Fix 3.0 sstable format version
Date Wed, 15 Jul 2015 09:31:39 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk a83407f8c -> ffc7745cf


Fix 3.0 sstable format version

patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for
CASSANDRA-9808


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

Branch: refs/heads/trunk
Commit: ffc7745cfbd12624653092b01f2e08b0f9332875
Parents: a83407f
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jul 15 00:08:46 2015 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jul 15 12:32:03 2015 +0300

----------------------------------------------------------------------
 CHANGES.txt                                         |  2 +-
 .../cassandra/io/sstable/format/big/BigFormat.java  | 16 +++++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ffc7745c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5c60239..0c71f52 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,7 +1,7 @@
 3.0
  * Change CREATE/ALTER TABLE syntax for compression (CASSANDRA-8384)
  * Cleanup crc and adler code for java 8 (CASSANDRA-9650)
- * Storage engine refactor (CASSANDRA-8099, 9743, 9746, 9759, 9781)
+ * Storage engine refactor (CASSANDRA-8099, 9743, 9746, 9759, 9781, 9808)
  * Update Guava to 18.0 (CASSANDRA-9653)
  * Bloom filter false positive ratio is not honoured (CASSANDRA-8413)
  * New option for cassandra-stress to leave a ratio of columns null (CASSANDRA-9522)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ffc7745c/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java b/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
index d5f506b..a5419f1 100644
--- a/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
@@ -104,7 +104,7 @@ public class BigFormat implements SSTableFormat
     // we always incremented the major version.
     static class BigVersion extends Version
     {
-        public static final String current_version = "la";
+        public static final String current_version = "ma";
         public static final String earliest_supported_version = "jb";
 
         // jb (2.0.1): switch from crc32 to adler32 for compression checksums
@@ -114,6 +114,8 @@ public class BigFormat implements SSTableFormat
         //             switch uncompressed checksums to adler32
         //             tracks presense of legacy (local and remote) counter shards
         // la (2.2.0): new file name format
+        // ma (3.0.0): swap bf hash order
+        //             store rows natively
 
         private final boolean isLatestVersion;
         private final boolean hasSamplingLevel;
@@ -132,7 +134,7 @@ public class BigFormat implements SSTableFormat
 
         BigVersion(String version)
         {
-            super(instance,version);
+            super(instance, version);
 
             isLatestVersion = version.compareTo(current_version) == 0;
             hasSamplingLevel = version.compareTo("ka") >= 0;
@@ -140,10 +142,14 @@ public class BigFormat implements SSTableFormat
             hasAllAdlerChecksums = version.compareTo("ka") >= 0;
             hasRepairedAt = version.compareTo("ka") >= 0;
             tracksLegacyCounterShards = version.compareTo("ka") >= 0;
+
             newFileName = version.compareTo("la") >= 0;
-            storeRows = version.compareTo("la") >= 0;
-            correspondingMessagingVersion = storeRows ? MessagingService.VERSION_30 : MessagingService.VERSION_21;
-            hasOldBfHashOrder = version.compareTo("la") < 0;
+
+            hasOldBfHashOrder = version.compareTo("ma") < 0;
+            storeRows = version.compareTo("ma") >= 0;
+            correspondingMessagingVersion = storeRows
+                                          ? MessagingService.VERSION_30
+                                          : MessagingService.VERSION_21;
         }
 
         @Override


Mime
View raw message