cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] cassandra git commit: Fix mixed version read request compatibility for compact static tables
Date Sat, 19 Sep 2015 18:18:02 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 4bb5976a7 -> bf5dd032f


Fix mixed version read request compatibility for compact static tables

patch by Blake Eggleston; reviewed by Aleksey Yeschenko for
CASSANDRA-10373


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

Branch: refs/heads/trunk
Commit: aba97fc265a796ea0ac76c1a4a4953501fe4ab95
Parents: cffa93c
Author: Blake Eggleston <bdeggleston@gmail.com>
Authored: Sat Sep 19 10:45:34 2015 -0700
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Sat Sep 19 19:15:19 2015 +0100

----------------------------------------------------------------------
 CHANGES.txt                                       | 2 ++
 src/java/org/apache/cassandra/db/ReadCommand.java | 6 ++++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/aba97fc2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 45fa773..851a19b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 3.0.0-rc1
+ * Fix mixed version read request compatibility for compact static tables
+   (CASSANDRA-10373)
  * Fix paging of DISTINCT with static and IN (CASSANDRA-10354)
  * Allow MATERIALIZED VIEW's SELECT statement to restrict primary key
    columns (CASSANDRA-9664)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aba97fc2/src/java/org/apache/cassandra/db/ReadCommand.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java b/src/java/org/apache/cassandra/db/ReadCommand.java
index 1c1da42..91227cf 100644
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@ -1297,6 +1297,12 @@ public abstract class ReadCommand implements ReadQuery
                 selectionBuilder.add(cellName.column);
             }
 
+            // for compact storage tables without clustering keys, the column holding the
selected value is named
+            // 'value' internally we add it to the selection here to prevent errors due to
unexpected column names
+            // when serializing the initial local data response
+            if (metadata.isStaticCompactTable() && clusterings.isEmpty())
+                selectionBuilder.addAll(metadata.partitionColumns());
+
             in.readBoolean();  // countCql3Rows
 
             // clusterings cannot include STATIC_CLUSTERING, so if the names filter is for
static columns, clusterings


Mime
View raw message