cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [5/10] git commit: fix sstable maxtimestamp forrow deletes andpre-1.1.1 sstables patch by jbellis; reviewed by slebresne for CASSANDRA-5153
Date Thu, 24 Jan 2013 14:58:02 GMT
fix sstable maxtimestamp forrow deletes andpre-1.1.1 sstables
patch by jbellis; reviewed by slebresne for CASSANDRA-5153


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

Branch: refs/heads/cassandra-1.2
Commit: 9c8d949301f1f082362225934cfeddd0d2cbe982
Parents: 11d1414
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Jan 23 19:52:05 2013 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Jan 23 19:52:29 2013 -0600

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../db/compaction/LazilyCompactedRow.java          |    3 ++-
 .../cassandra/io/sstable/SSTableMetadata.java      |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c8d9493/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9cdb02a..61bcf60 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.1.10
  * fix saved key cache not loading at startup (CASSANDRA-5166)
  * fix ConcurrentModificationException in getBootstrapSource (CASSANDRA-5170)
+ * fix sstable maxtimestamp for row deletes and pre-1.1.1 sstables (CASSANDRA-5153)
 
 
 1.1.9

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c8d9493/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index d82abf8..37de137 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -91,7 +91,8 @@ public class LazilyCompactedRow extends AbstractCompactedRow implements
IIterabl
         // (however, if there are zero columns, iterator() will not be called by ColumnIndexer
and reducer will be null)
         columnCount = reducer == null ? 0 : reducer.size;
         columnSerializedSize = reducer == null ? 0 : reducer.serializedSize;
-        maxTimestamp = reducer == null ? Long.MIN_VALUE : reducer.maxTimestampSeen;
+        long rowTombstone = emptyColumnFamily.getMarkedForDeleteAt();
+        maxTimestamp = reducer == null ? rowTombstone : Math.max(rowTombstone, reducer.maxTimestampSeen);
         reducer = null;
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c8d9493/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
index 302fb50..99ced30 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
@@ -225,7 +225,7 @@ public class SSTableMetadata
             }
             long maxTimestamp = desc.containsTimestamp() ? dis.readLong() : Long.MIN_VALUE;
             if (!desc.tracksMaxTimestamp) // see javadoc to Descriptor.containsTimestamp
-                maxTimestamp = Long.MIN_VALUE;
+                maxTimestamp = Long.MAX_VALUE;
             double compressionRatio = desc.hasCompressionRatio
                                     ? dis.readDouble()
                                     : Double.MIN_VALUE;


Mime
View raw message