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 A31A018E6B for ; Wed, 15 Jul 2015 09:31:39 +0000 (UTC) Received: (qmail 42890 invoked by uid 500); 15 Jul 2015 09:31:39 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 42855 invoked by uid 500); 15 Jul 2015 09:31:39 -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 42844 invoked by uid 99); 15 Jul 2015 09:31:39 -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; Wed, 15 Jul 2015 09:31:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3437BDFF96; Wed, 15 Jul 2015 09:31:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aleksey@apache.org To: commits@cassandra.apache.org Message-Id: <49e1f67a447f4d49a39de08e78e992b2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cassandra git commit: Fix 3.0 sstable format version Date: Wed, 15 Jul 2015 09:31:39 +0000 (UTC) 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 Authored: Wed Jul 15 00:08:46 2015 +0300 Committer: Aleksey Yeschenko 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