cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [33/50] cassandra git commit: Fix migration of static thrift column names with non-text comparators
Date Mon, 18 Jul 2016 15:43:48 GMT
Fix migration of static thrift column names with non-text comparators

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


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

Branch: refs/heads/cassandra-3.8
Commit: 4d7141f75866939b8a55a0d3ee09153ee75f80f9
Parents: f37b6f1
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jul 6 17:56:51 2016 +0100
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Mon Jul 11 14:36:24 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                         | 1 +
 src/java/org/apache/cassandra/db/CompactTables.java | 7 ++-----
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d7141f7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f2d11b9..4241da8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.9
+ * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147)
  * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315)
  * Fix reverse queries ignoring range tombstones (CASSANDRA-11733)
 2.2.8

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d7141f7/src/java/org/apache/cassandra/db/CompactTables.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CompactTables.java b/src/java/org/apache/cassandra/db/CompactTables.java
index a73b865..e31fda3 100644
--- a/src/java/org/apache/cassandra/db/CompactTables.java
+++ b/src/java/org/apache/cassandra/db/CompactTables.java
@@ -93,13 +93,10 @@ public abstract class CompactTables
 
     public static AbstractType<?> columnDefinitionComparator(String kind, boolean isSuper,
AbstractType<?> rawComparator, AbstractType<?> rawSubComparator)
     {
-        if ("compact_value".equals(kind))
+        if (!"regular".equals(kind))
             return UTF8Type.instance;
 
-        if (isSuper)
-            return "regular".equals(kind) ? rawSubComparator : UTF8Type.instance;
-
-        return "static".equals(kind) ? rawComparator : UTF8Type.instance;
+        return isSuper ? rawSubComparator : rawComparator;
     }
 
     public static boolean hasEmptyCompactValue(CFMetaData metadata)


Mime
View raw message