fix sstable maxtimestamp forrow deletes andpre-1.1.1 sstables

patch by jbellis; reviewed by slebresne for CASSANDRA-5153
This commit is contained in:
Jonathan Ellis 2013-01-23 19:52:05 -06:00
parent 11d1414628
commit 9c8d949301
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

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

View File

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