cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/6] cassandra git commit: Inconditionally update the sstable deletion info for live LivenessInfo
Date Tue, 02 Feb 2016 13:23:26 GMT
Inconditionally update the sstable deletion info for live LivenessInfo

patch by slebresne; reviewed by krummas for CASSANDRA-11102


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

Branch: refs/heads/trunk
Commit: df3d0b00b0d9a0725b3f1681e6ce9ffe6d330de4
Parents: c83d108
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Feb 2 10:27:49 2016 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Feb 2 14:22:20 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../cassandra/io/sstable/metadata/MetadataCollector.java      | 7 ++-----
 .../org/apache/cassandra/db/compaction/TTLExpiryTest.java     | 2 ++
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/df3d0b00/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index da6f5cc..3423927 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.3
+ * Fix incorrect computation of deletion time in sstable metadata (CASSANDRA-11102)
  * Avoid memory leak when collecting sstable metadata (CASSANDRA-11026)
  * Mutations do not block for completion under view lock contention (CASSANDRA-10779)
  * Invalidate legacy schema tables when unloading them (CASSANDRA-11071)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/df3d0b00/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java b/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
index 3947dc8..c2b0caf 100644
--- a/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
+++ b/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
@@ -169,11 +169,8 @@ public class MetadataCollector implements PartitionStatisticsCollector
             return;
 
         updateTimestamp(newInfo.timestamp());
-        if (newInfo.isExpiring())
-        {
-            updateTTL(newInfo.ttl());
-            updateLocalDeletionTime(newInfo.localExpirationTime());
-        }
+        updateTTL(newInfo.ttl());
+        updateLocalDeletionTime(newInfo.localExpirationTime());
     }
 
     public void update(Cell cell)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/df3d0b00/test/unit/org/apache/cassandra/db/compaction/TTLExpiryTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/compaction/TTLExpiryTest.java b/test/unit/org/apache/cassandra/db/compaction/TTLExpiryTest.java
index 7dd3da0..b264553 100644
--- a/test/unit/org/apache/cassandra/db/compaction/TTLExpiryTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/TTLExpiryTest.java
@@ -258,6 +258,7 @@ public class TTLExpiryTest
         cfs.metadata.gcGraceSeconds(0);
 
         new RowUpdateBuilder(cfs.metadata, System.currentTimeMillis(), "test")
+                .noRowMarker()
                 .add("col1", ByteBufferUtil.EMPTY_BYTE_BUFFER)
                 .build()
                 .applyUnsafe();
@@ -267,6 +268,7 @@ public class TTLExpiryTest
         for (int i = 0; i < 10; i++)
         {
             new RowUpdateBuilder(cfs.metadata, System.currentTimeMillis(), "test")
+                            .noRowMarker()
                             .delete("col1")
                             .build()
                             .applyUnsafe();


Mime
View raw message