Commits

Anonymous committed 9c8d949

fix sstable maxtimestamp forrow deletes andpre-1.1.1 sstables
patch by jbellis; reviewed by slebresne for CASSANDRA-5153

  • Participants
  • Parent commits 11d1414

Comments (0)

Files changed (3)

 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

File src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java

         // (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;
     }
 

File src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java

             }
             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;