You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by st...@apache.org on 2016/07/25 00:47:18 UTC

[02/41] cassandra git commit: Revert "Range tombstones that are masked by row tombstones should not be written out"

Revert "Range tombstones that are masked by row tombstones should not be written out"

This reverts commit 98f5f77bb3c5d50e52cbb6f577a463ca8a5134ad.

(See thread at https://mail-archives.apache.org/mod_mbox/cassandra-dev/201607.mbox/%3CCALdd-zjg%2Ba73VncPkU2rw_UpFPVsw0yNwO-yBqUQfK8H8FpiKw%40mail.gmail.com%3E)


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

Branch: refs/heads/cassandra-3.9
Commit: e865e8875370db8349f8d836594f45978b855943
Parents: 98f5f77
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jul 21 10:15:41 2016 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jul 21 10:15:41 2016 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 -
 .../db/compaction/LazilyCompactedRow.java       |  3 +-
 .../apache/cassandra/db/RangeTombstoneTest.java | 40 --------------------
 3 files changed, 1 insertion(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e865e887/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7fa995d..b1dcbe1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,4 @@
 2.1.16
- * Don't write shadowed range tombstone (CASSANDRA-12030)
  * Fix filtering on clustering columns when 2i is used (CASSANDRA-11907)
  * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
  * Improve digest calculation in the presence of overlapping tombstones (CASSANDRA-11349)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e865e887/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 dab5eeb..f912da2 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -286,8 +286,7 @@ public class LazilyCompactedRow extends AbstractCompactedRow
                 RangeTombstone t = tombstone;
                 tombstone = null;
 
-                if (t.data.isGcAble(controller.gcBefore) && t.timestamp() < getMaxPurgeableTimestamp() ||
-                    maxRowTombstone.markedForDeleteAt >= t.timestamp())
+                if (t.data.isGcAble(controller.gcBefore) && t.timestamp() < getMaxPurgeableTimestamp())
                 {
                     indexBuilder.tombstoneTracker().update(t, true);
                     return null;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e865e887/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
index dfd6960..3292422 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -39,7 +39,6 @@ import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.config.IndexType;
 import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
 import org.apache.cassandra.db.compaction.CompactionManager;
-import org.apache.cassandra.db.compaction.LeveledCompactionStrategy;
 import org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy;
 import org.apache.cassandra.db.composites.CellName;
 import org.apache.cassandra.db.composites.CellNames;
@@ -544,45 +543,6 @@ public class RangeTombstoneTest extends SchemaLoader
     }
 
     @Test
-    public void testCompactionOfRangeTombstonesCoveredByRowTombstone() throws Exception
-    {
-        long testTimeStamp = 1451606400L; // 01/01/2016 : 00:00:00 GMT
-        Keyspace table = Keyspace.open(KSNAME);
-        ColumnFamilyStore cfs = table.getColumnFamilyStore(CFNAME);
-        ByteBuffer key = ByteBufferUtil.bytes("k4");
-
-        // remove any existing sstables before starting
-        cfs.truncateBlocking();
-        cfs.disableAutoCompaction();
-        cfs.setCompactionStrategyClass(LeveledCompactionStrategy.class.getCanonicalName());
-
-        Mutation rm = new Mutation(KSNAME, key);
-        for (int i = 1; i < 11; i += 2, testTimeStamp += i * 10)
-            add(rm, i, testTimeStamp);
-        rm.apply();
-        cfs.forceBlockingFlush();
-
-        rm = new Mutation(KSNAME, key);
-        ColumnFamily cf = rm.addOrGet(CFNAME);
-
-        // Write the covering row tombstone
-        cf.delete(new DeletionTime(++testTimeStamp, (int) testTimeStamp));
-
-        // Create range tombstones covered by row tombstone above.
-        for (int i = 1; i < 11; i += 2, testTimeStamp -= i * 5)
-            delete(cf, 0, 7, testTimeStamp);
-        rm.apply();
-        cfs.forceBlockingFlush();
-
-        // there should be 2 sstables
-        assertEquals(2, cfs.getSSTables().size());
-
-        // compact down to nothing
-        CompactionManager.instance.performMaximal(cfs);
-        assertEquals(0, cfs.getSSTables().size());
-    }
-
-    @Test
     public void testOverwritesToDeletedColumns() throws Exception
     {
         Keyspace table = Keyspace.open(KSNAME);