cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/2] git commit: Fix insertion of collections with CAS
Date Mon, 23 Sep 2013 14:42:32 GMT
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/cassandra-2.0
Commit: fb55849795ca918f08412fc00fb1a8b8eaa13065
Parents: ba59423
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Sep 23 16:41:45 2013 +0200
Committer: Sylvain Lebresne <sylvain@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;


Mime
View raw message