You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2013/09/23 16:42:45 UTC

[1/3] git commit: Fix thrift validation refusing row markers on CQL3 tables

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 <sy...@datastax.com>
Authored: Mon Sep 23 16:39:45 2013 +0200
Committer: Sylvain Lebresne <sy...@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",


[2/3] git commit: Fix insertion of collections with CAS

Posted by sl...@apache.org.
Fix insertion of collections with CAS

patch by slebresne; reviewed by iamaleksey for CASSANDRA-6069


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

Branch: refs/heads/trunk
Commit: fb55849795ca918f08412fc00fb1a8b8eaa13065
Parents: ba59423
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Mon Sep 23 16:41:45 2013 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Mon Sep 23 16:41:45 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                             | 3 ++-
 src/java/org/apache/cassandra/service/paxos/Commit.java | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb558497/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cd23fbf..88daf35 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,11 +1,12 @@
 2.0.2
  * Move batchlog replay to its own executor (CASSANDRA-6079)
+ * Fix thrift validation refusing row markers on CQL3 tables (CASSANDRA-6081)
+ * Fix insertion of collections with CAS (CASSANDRA-6069)
 Merged from 1.2:
  * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
  * 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/fb558497/src/java/org/apache/cassandra/service/paxos/Commit.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/paxos/Commit.java b/src/java/org/apache/cassandra/service/paxos/Commit.java
index 84589cc..9904045 100644
--- a/src/java/org/apache/cassandra/service/paxos/Commit.java
+++ b/src/java/org/apache/cassandra/service/paxos/Commit.java
@@ -116,7 +116,10 @@ public class Commit
     {
         ColumnFamily cf = updates.cloneMeShallow();
         long t = UUIDGen.microsTimestamp(ballot);
-        cf.deletionInfo().updateAllTimestamp(t);
+        // For the tombstones, we use t-1 so that when insert a collection literall, the range tombstone that deletes the previous values of
+        // the collection and we want that to have a lower timestamp and our new values. Since tombstones wins over normal insert, using t-1
+        // should not be a problem in general (see #6069).
+        cf.deletionInfo().updateAllTimestamp(t-1);
         for (Column column : updates)
             cf.addAtom(column.withUpdatedTimestamp(t));
         return cf;


[3/3] git commit: Merge branch 'cassandra-2.0' into trunk

Posted by sl...@apache.org.
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: 74e710a122ea13f31c49b2398b43fe04798b053c
Parents: 64309ee fb55849
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Mon Sep 23 16:42:39 2013 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Mon Sep 23 16:42:39 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                | 2 ++
 src/java/org/apache/cassandra/service/paxos/Commit.java    | 5 ++++-
 src/java/org/apache/cassandra/thrift/ThriftValidation.java | 3 +++
 3 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/74e710a1/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 9917ec1,88daf35..f4818fe
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,7 +1,15 @@@
 +2.1
 + * change logging from log4j to logback (CASSANDRA-5883)
 + * switch to LZ4 compression for internode communication (CASSANDRA-5887)
 + * Stop using Thrift-generated Index* classes internally (CASSANDRA-5971)
 + * Remove 1.2 network compatibility code (CASSANDRA-5960)
 + * Remove leveled json manifest migration code (CASSANDRA-5996)
 +
 +
  2.0.2
   * Move batchlog replay to its own executor (CASSANDRA-6079)
+  * Fix thrift validation refusing row markers on CQL3 tables (CASSANDRA-6081)
+  * Fix insertion of collections with CAS (CASSANDRA-6069)
  Merged from 1.2:
   * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
   * Allow where clause conditions to be in parenthesis (CASSANDRA-6037)