cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [3/4] git commit: Avoid discarding dropped ks deletion timestamp patch by Sam Tunnicliffe and jbellis; reviewed by tjake for CASSANDRA-4752
Date Thu, 04 Oct 2012 15:45:20 GMT
Avoid discarding dropped ks deletion timestamp
patch by Sam Tunnicliffe and jbellis; reviewed by tjake for CASSANDRA-4752


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

Branch: refs/heads/trunk
Commit: 0d44159e63a2f5b56d621ba71a2f3fadd7f5a301
Parents: 3f31642
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Oct 4 10:28:52 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Oct 4 10:28:52 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                       |    3 ++-
 src/java/org/apache/cassandra/db/RowMutation.java |    9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d44159e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c0a252e..218c320 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,7 +10,8 @@
  * Automatic fixing of overlapping leveled sstables (CASSANDRA-4644)
  * fix error when using ORDER BY with extended selections (CASSANDRA-4689)
  * (CQL3) Fix validation for IN queries for non-PK cols (CASSANDRA-4709)
- * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698)
+ * fix re-created keyspace disappering after 1.1.5 upgrade 
+   (CASSANDRA-4698, 4752)
  * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
  * add authentication support to sstableloader (CASSANDRA-4712)
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716, 4759)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d44159e/src/java/org/apache/cassandra/db/RowMutation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java
index 51dac68..3a05df9 100644
--- a/src/java/org/apache/cassandra/db/RowMutation.java
+++ b/src/java/org/apache/cassandra/db/RowMutation.java
@@ -462,12 +462,13 @@ public class RowMutation implements IMutation, MessageProducer
 
             for (Map.Entry<Integer, ColumnFamily> modification : mutation.modifications_.entrySet())
             {
-                ColumnFamily cf = ColumnFamily.create(modification.getValue().metadata());
+                ColumnFamily cfOld = modification.getValue();
+                ColumnFamily cf = ColumnFamily.create(cfOld.metadata());
 
-                if (cf.isMarkedForDelete())
-                    cf.delete(cf.getLocalDeletionTime(), cf.getMarkedForDeleteAt() > now
? now : cf.getMarkedForDeleteAt());
+                if (cfOld.isMarkedForDelete())
+                    cf.delete(cfOld.getLocalDeletionTime(), cfOld.getMarkedForDeleteAt()
> now ? now : cfOld.getMarkedForDeleteAt());
 
-                for (IColumn column : modification.getValue().columns)
+                for (IColumn column : cfOld.columns)
                 {
                     // don't clone if column already has a correct timestamp
                     if (column.timestamp() <= now)


Mime
View raw message