cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [6/7] git commit: Fix bad default for min/max timestamp in SSTableMetadata
Date Mon, 25 Mar 2013 19:21:27 GMT
Fix bad default for min/max timestamp in SSTableMetadata

patch by slebresne; reviewed by jasobrown for CASSANDRA-5372


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

Branch: refs/heads/trunk
Commit: 043972417976cd1947d02d3da21437ae73fdac56
Parents: 381fe75
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Mar 25 15:25:08 2013 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Mar 25 20:12:36 2013 +0100

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/04397241/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4c7fdb4..dfeb19e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -39,6 +39,7 @@
    (CASSANDRA-4937)
 Merged from 1.1:
  * cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
+ * Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)
 
 
 1.2.3

http://git-wip-us.apache.org/repos/asf/cassandra/blob/04397241/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 28a6485..e38e091 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
@@ -410,9 +410,7 @@ public class SSTableMetadata
                 replayPosition = ReplayPosition.NONE;
             }
             long minTimestamp = desc.version.tracksMinTimestamp ? dis.readLong() : Long.MIN_VALUE;
-            if (!desc.version.tracksMinTimestamp)
-                minTimestamp = Long.MAX_VALUE;
-            long maxTimestamp = desc.version.containsTimestamp() ? dis.readLong() : Long.MIN_VALUE;
+            long maxTimestamp = desc.version.containsTimestamp() ? dis.readLong() : Long.MAX_VALUE;
             if (!desc.version.tracksMaxTimestamp) // see javadoc to Descriptor.containsTimestamp
                 maxTimestamp = Long.MAX_VALUE;
             int maxLocalDeletionTime = desc.version.tracksMaxLocalDeletionTime ? dis.readInt()
: Integer.MAX_VALUE;


Mime
View raw message