cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Fix CFMetaData#isThriftCompatible() for PK-only tables
Date Tue, 26 Aug 2014 15:43:34 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 6b7697589 -> 9219361b6


Fix CFMetaData#isThriftCompatible() for PK-only tables

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


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

Branch: refs/heads/cassandra-2.0
Commit: 9219361b62134ec6773f06ce9aeb8b9d04180052
Parents: 6b76975
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Aug 26 18:39:42 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Aug 26 18:41:38 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                          | 2 ++
 src/java/org/apache/cassandra/config/CFMetaData.java | 5 +++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9219361b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7a59744..9c6bd61 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,10 @@
 2.0.11:
+ * Fix CFMetaData#isThriftCompatible() for PK-only tables (CASSANDRA-7832)
  * Always reject inequality on the partition key without token()
    (CASSANDRA-7722)
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
 
+
 2.0.10
  * Don't send schema change responses and events for no-op DDL
    statements (CASSANDRA-7600)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9219361b/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index eaec9c3..fc8e8c3 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -2162,6 +2162,11 @@ public final class CFMetaData
             if (def.type == ColumnDefinition.Type.REGULAR && !def.isThriftCompatible())
                 return false;
         }
+
+        // The table might also have no REGULAR columns (be PK-only), but still be "thrift
incompatible". See #7832.
+        if (isCQL3OnlyPKComparator(comparator) && !isDense)
+            return false;
+
         return true;
     }
 


Mime
View raw message