cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/3] git commit: Fix thrift validation refusing row markers on CQL3 tables
Date Mon, 23 Sep 2013 14:42:45 GMT
Updated Branches:
  refs/heads/trunk 64309eeb8 -> 74e710a12


Fix thrift validation refusing row markers on CQL3 tables

patch by slebresne; reviewed by jbellis for CASSANDRA-6081


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

Branch: refs/heads/trunk
Commit: ba59423b69b6d3c8c8372ee1ee40ffddf0f9d2ad
Parents: 5176ce7
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Sep 23 16:39:45 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Sep 23 16:39:45 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                | 1 +
 src/java/org/apache/cassandra/thrift/ThriftValidation.java | 3 +++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba59423b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index bae83ca..cd23fbf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,6 +5,7 @@ Merged from 1.2:
  * Allow where clause conditions to be in parenthesis (CASSANDRA-6037)
  * Do not open non-ssl storage port if encryption option is all (CASSANDRA-3916)
  * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
+ * Fix thrift validation refusing row markers on CQL3 tables (CASSANDRA-6081)
 
 
 2.0.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba59423b/src/java/org/apache/cassandra/thrift/ThriftValidation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java
index 6f6a5eb..012a943 100644
--- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java
+++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java
@@ -241,6 +241,9 @@ public class ThriftValidation
                 // Furthermore, the column name must be a declared one.
                 int columnIndex = composite.types.size() - (cfDef.hasCollections ? 2 : 1);
                 ByteBuffer CQL3ColumnName = components[columnIndex];
+                if (!CQL3ColumnName.hasRemaining())
+                    continue; // Row marker, ok
+
                 ColumnIdentifier columnId = new ColumnIdentifier(CQL3ColumnName, composite.types.get(columnIndex));
                 if (cfDef.metadata.get(columnId) == null)
                     throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("Invalid
cell for CQL3 table %s. The CQL3 column component (%s) does not correspond to a defined CQL3
column",


Mime
View raw message