cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Optimize Cell liveness checks and clean up Cell
Date Wed, 30 Apr 2014 19:14:22 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk cf3f5b6ef -> b35486a19


Optimize Cell liveness checks and clean up Cell

patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for
CASSANDRA-7119


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

Branch: refs/heads/trunk
Commit: 4485e6dbfed89c9137a58412210e56ae88cfe217
Parents: 9872b74
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Apr 30 21:06:46 2014 +0200
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Apr 30 21:06:46 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/cassandra/cql/QueryProcessor.java    |  4 +-
 .../cassandra/cql3/statements/Selection.java    |  2 +-
 .../org/apache/cassandra/db/AbstractCell.java   | 39 +++++---------------
 .../cassandra/db/BufferCounterUpdateCell.java   |  6 +--
 .../apache/cassandra/db/BufferDeletedCell.java  |  8 ++--
 .../apache/cassandra/db/BufferExpiringCell.java |  8 ++--
 src/java/org/apache/cassandra/db/Cell.java      |  9 +----
 .../apache/cassandra/db/CounterMutation.java    |  2 +-
 .../cassandra/db/HintedHandOffManager.java      |  2 +-
 .../apache/cassandra/db/NativeDeletedCell.java  |  8 ++--
 .../apache/cassandra/db/NativeExpiringCell.java |  8 ++--
 .../db/compaction/LazilyCompactedRow.java       |  5 +--
 .../db/composites/AbstractCellNameType.java     |  4 +-
 .../AbstractSimplePerColumnSecondaryIndex.java  |  3 +-
 .../db/index/SecondaryIndexManager.java         |  8 ++--
 .../CompositesIndexOnCollectionKey.java         |  4 +-
 .../CompositesIndexOnCollectionValue.java       | 10 ++---
 .../composites/CompositesIndexOnRegular.java    |  8 +---
 .../db/index/composites/CompositesSearcher.java |  8 +---
 .../cassandra/db/index/keys/KeysIndex.java      |  8 +---
 .../cassandra/db/index/keys/KeysSearcher.java   |  2 +-
 .../apache/cassandra/service/CacheService.java  |  2 +-
 .../cassandra/thrift/CassandraServer.java       | 10 ++---
 .../apache/cassandra/db/ColumnFamilyTest.java   |  5 ++-
 .../apache/cassandra/db/CounterCellTest.java    |  8 ++--
 .../apache/cassandra/db/RangeTombstoneTest.java |  2 +-
 .../org/apache/cassandra/db/RemoveCellTest.java | 14 +++----
 .../apache/cassandra/db/RemoveSubCellTest.java  |  5 ++-
 test/unit/org/apache/cassandra/db/RowTest.java  |  5 ++-
 .../db/compaction/CompactionsPurgeTest.java     |  6 +--
 .../db/index/PerRowSecondaryIndexTest.java      | 15 +++-----
 .../cassandra/service/QueryPagerTest.java       |  2 +-
 33 files changed, 92 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a4811f6..34533cc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -55,6 +55,7 @@
  * Multi-threaded scrub/cleanup/upgradesstables (CASSANDRA-5547)
  * Optimize cellname comparison (CASSANDRA-6934)
  * Native protocol v3 (CASSANDRA-6855)
+ * Optimize Cell liveness checks and clean up Cell (CASSANDRA-7119)
 Merged from 2.0:
  * Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
  * Set JMX RMI port to 7199 (CASSANDRA-7087)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/cql/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/QueryProcessor.java b/src/java/org/apache/cassandra/cql/QueryProcessor.java
index 3b35555..3c1d555 100644
--- a/src/java/org/apache/cassandra/cql/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql/QueryProcessor.java
@@ -469,7 +469,7 @@ public class QueryProcessor
                         {
                             for (org.apache.cassandra.db.Cell c : row.cf.getSortedColumns())
                             {
-                                if (c.isMarkedForDelete(now))
+                                if (!c.isLive(now))
                                     continue;
 
                                 ColumnDefinition cd = metadata.getColumnDefinition(c.name());
@@ -515,7 +515,7 @@ public class QueryProcessor
                             if (cd != null)
                                 result.schema.value_types.put(nameBytes, TypeParser.getShortName(cd.type));
                             org.apache.cassandra.db.Cell c = row.cf.getColumn(name);
-                            if (c == null || c.isMarkedForDelete(System.currentTimeMillis()))
+                            if (c == null || !c.isLive())
                                 thriftColumns.add(new Column().setName(nameBytes));
                             else
                                 thriftColumns.add(thriftify(c));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/cql3/statements/Selection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/Selection.java b/src/java/org/apache/cassandra/cql3/statements/Selection.java
index c506cc6..af1e621 100644
--- a/src/java/org/apache/cassandra/cql3/statements/Selection.java
+++ b/src/java/org/apache/cassandra/cql3/statements/Selection.java
@@ -315,7 +315,7 @@ public abstract class Selection
 
         private boolean isDead(Cell c)
         {
-            return c == null || c.isMarkedForDelete(now);
+            return c == null || !c.isLive(now);
         }
 
         public void newRow() throws InvalidRequestException

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/AbstractCell.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/AbstractCell.java b/src/java/org/apache/cassandra/db/AbstractCell.java
index 1075278..238b8c0 100644
--- a/src/java/org/apache/cassandra/db/AbstractCell.java
+++ b/src/java/org/apache/cassandra/db/AbstractCell.java
@@ -63,32 +63,21 @@ public abstract class AbstractCell implements Cell
         };
     }
 
-    @Override
-    public boolean isMarkedForDelete(long now)
+    public boolean isLive()
     {
-        return false;
+        return true;
     }
 
-    @Override
     public boolean isLive(long now)
     {
-        return !isMarkedForDelete(now);
-    }
-
-    // Don't call unless the column is actually marked for delete.
-    @Override
-    public long getMarkedForDeleteAt()
-    {
-        return Long.MAX_VALUE;
+        return true;
     }
 
-    @Override
     public int cellDataSize()
     {
         return name().dataSize() + value().remaining() + TypeSizes.NATIVE.sizeof(timestamp());
     }
 
-    @Override
     public int serializedSize(CellNameType type, TypeSizes typeSizes)
     {
         /*
@@ -103,13 +92,11 @@ public abstract class AbstractCell implements Cell
         return ((int)type.cellSerializer().serializedSize(name(), typeSizes)) + 1 + typeSizes.sizeof(timestamp()) + typeSizes.sizeof(valueSize) + valueSize;
     }
 
-    @Override
     public int serializationFlags()
     {
         return 0;
     }
 
-    @Override
     public Cell diff(Cell cell)
     {
         if (timestamp() < cell.timestamp())
@@ -117,7 +104,6 @@ public abstract class AbstractCell implements Cell
         return null;
     }
 
-    @Override
     public void updateDigest(MessageDigest digest)
     {
         digest.update(name().toByteBuffer().duplicate());
@@ -127,19 +113,17 @@ public abstract class AbstractCell implements Cell
         FBUtilities.updateWithByte(digest, serializationFlags());
     }
 
-    @Override
     public int getLocalDeletionTime()
     {
         return Integer.MAX_VALUE;
     }
 
-    @Override
     public Cell reconcile(Cell cell)
     {
         // tombstones take precedence.  (if both are tombstones, then it doesn't matter which one we use.)
-        if (isMarkedForDelete(System.currentTimeMillis()))
+        if (!isLive())
             return timestamp() < cell.timestamp() ? cell : this;
-        if (cell.isMarkedForDelete(System.currentTimeMillis()))
+        if (!cell.isLive())
             return timestamp() > cell.timestamp() ? this : cell;
         // break ties by comparing values.
         if (timestamp() == cell.timestamp())
@@ -164,23 +148,20 @@ public abstract class AbstractCell implements Cell
         throw new UnsupportedOperationException();
     }
 
-    @Override
     public String getString(CellNameType comparator)
     {
         return String.format("%s:%b:%d@%d",
-                comparator.getString(name()),
-                isMarkedForDelete(System.currentTimeMillis()),
-                value().remaining(),
-                timestamp());
+                             comparator.getString(name()),
+                             !isLive(),
+                             value().remaining(),
+                             timestamp());
     }
 
-    @Override
     public void validateName(CFMetaData metadata) throws MarshalException
     {
         metadata.comparator.validate(name());
     }
 
-    @Override
     public void validateFields(CFMetaData metadata) throws MarshalException
     {
         validateName(metadata);
@@ -225,7 +206,7 @@ public abstract class AbstractCell implements Cell
         assert (b instanceof CounterCell) || (b instanceof DeletedCell) : "Wrong class type: " + b.getClass();
 
         // live + tombstone: track last tombstone
-        if (b.isMarkedForDelete(Long.MIN_VALUE)) // cannot be an expired cell, so the current time is irrelevant
+        if (!b.isLive()) // cannot be an expired cell, so the current time is irrelevant
         {
             // live < tombstone
             if (a.timestamp() < b.timestamp())

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/BufferCounterUpdateCell.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/BufferCounterUpdateCell.java b/src/java/org/apache/cassandra/db/BufferCounterUpdateCell.java
index 44ab83e..24c9fad 100644
--- a/src/java/org/apache/cassandra/db/BufferCounterUpdateCell.java
+++ b/src/java/org/apache/cassandra/db/BufferCounterUpdateCell.java
@@ -55,16 +55,16 @@ public class BufferCounterUpdateCell extends BufferCell implements CounterUpdate
     public Cell reconcile(Cell cell)
     {
         // The only time this could happen is if a batchAdd ships two
-        // increment for the same cell. Hence we simply sums the delta.
+        // increment for the same cell. Hence we simply sums the delta and the timestamps.
 
         // tombstones take precedence
-        if (cell.isMarkedForDelete(Long.MIN_VALUE)) // can't be an expired cell, so the current time is irrelevant
+        if (!cell.isLive()) // can't be an expired cell, so the current time is irrelevant
             return timestamp > cell.timestamp() ? this : cell;
 
         // neither is tombstoned
         assert cell instanceof CounterUpdateCell : "Wrong class type.";
         CounterUpdateCell c = (CounterUpdateCell) cell;
-        return new BufferCounterUpdateCell(name, delta() + c.delta(), Math.max(timestamp, c.timestamp()));
+        return new BufferCounterUpdateCell(name, delta() + c.delta(), timestamp + c.timestamp());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/BufferDeletedCell.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/BufferDeletedCell.java b/src/java/org/apache/cassandra/db/BufferDeletedCell.java
index a6518de..bcc170f 100644
--- a/src/java/org/apache/cassandra/db/BufferDeletedCell.java
+++ b/src/java/org/apache/cassandra/db/BufferDeletedCell.java
@@ -54,15 +54,15 @@ public class BufferDeletedCell extends BufferCell implements DeletedCell
     }
 
     @Override
-    public boolean isMarkedForDelete(long now)
+    public boolean isLive()
     {
-        return true;
+        return false;
     }
 
     @Override
-    public long getMarkedForDeleteAt()
+    public boolean isLive(long now)
     {
-        return timestamp;
+        return false;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/BufferExpiringCell.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/BufferExpiringCell.java b/src/java/org/apache/cassandra/db/BufferExpiringCell.java
index 95ed45a..38d84f4 100644
--- a/src/java/org/apache/cassandra/db/BufferExpiringCell.java
+++ b/src/java/org/apache/cassandra/db/BufferExpiringCell.java
@@ -114,15 +114,15 @@ public class BufferExpiringCell extends BufferCell implements ExpiringCell
     }
 
     @Override
-    public boolean isMarkedForDelete(long now)
+    public boolean isLive()
     {
-        return (int) (now / 1000) >= getLocalDeletionTime();
+        return isLive(System.currentTimeMillis());
     }
 
     @Override
-    public long getMarkedForDeleteAt()
+    public boolean isLive(long now)
     {
-        return timestamp;
+        return (int) (now / 1000) < getLocalDeletionTime();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/Cell.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Cell.java b/src/java/org/apache/cassandra/db/Cell.java
index c19b5dd..f91376d 100644
--- a/src/java/org/apache/cassandra/db/Cell.java
+++ b/src/java/org/apache/cassandra/db/Cell.java
@@ -22,7 +22,6 @@ import java.nio.ByteBuffer;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.db.composites.CellName;
 import org.apache.cassandra.db.composites.CellNameType;
-import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.concurrent.OpOrder;
 import org.apache.cassandra.utils.memory.AbstractAllocator;
 import org.apache.cassandra.utils.FBUtilities;
@@ -44,13 +43,10 @@ public interface Cell extends OnDiskAtom
 
     public ByteBuffer value();
 
-    public boolean isMarkedForDelete(long now);
+    public boolean isLive();
 
     public boolean isLive(long now);
 
-    // Don't call unless the column is actually marked for delete.
-    public long getMarkedForDeleteAt();
-
     public int cellDataSize();
 
     // returns the size of the Cell and all references on the heap, excluding any costs associated with byte arrays
@@ -58,6 +54,7 @@ public interface Cell extends OnDiskAtom
     public long excessHeapSizeExcludingData();
 
     public int serializedSize(CellNameType type, TypeSizes typeSizes);
+
     public int serializationFlags();
 
     public Cell diff(Cell cell);
@@ -69,6 +66,4 @@ public interface Cell extends OnDiskAtom
     public Cell localCopy(CFMetaData metaData, MemtableAllocator allocator, OpOrder.Group opGroup);
 
     public String getString(CellNameType comparator);
-
-    void validateName(CFMetaData metadata) throws MarshalException;
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/CounterMutation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CounterMutation.java b/src/java/org/apache/cassandra/db/CounterMutation.java
index 32571cc..58889c1 100644
--- a/src/java/org/apache/cassandra/db/CounterMutation.java
+++ b/src/java/org/apache/cassandra/db/CounterMutation.java
@@ -265,7 +265,7 @@ public class CounterMutation implements IMutation
                 continue;
 
             Cell cell = cf == null ? null : cf.getColumn(counterUpdateCells.get(i).name());
-            if (cell == null || cell.isMarkedForDelete(Long.MIN_VALUE)) // absent or a tombstone.
+            if (cell == null || !cell.isLive()) // absent or a tombstone.
                 currentValues[i] = ClockAndCount.BLANK;
             else
                 currentValues[i] = CounterContext.instance().getLocalClockAndCount(cell.value());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/HintedHandOffManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/HintedHandOffManager.java b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
index 8c892d6..0337756 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -402,7 +402,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
                 // in which the local deletion timestamp was generated on the last column in the old page, in which
                 // case the hint will have no columns (since it's deleted) but will still be included in the resultset
                 // since (even with gcgs=0) it's still a "relevant" tombstone.
-                if (!hint.isLive(System.currentTimeMillis()))
+                if (!hint.isLive())
                     continue;
 
                 startColumn = hint.name();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/NativeDeletedCell.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/NativeDeletedCell.java b/src/java/org/apache/cassandra/db/NativeDeletedCell.java
index 8bfc95b..20118a4 100644
--- a/src/java/org/apache/cassandra/db/NativeDeletedCell.java
+++ b/src/java/org/apache/cassandra/db/NativeDeletedCell.java
@@ -50,15 +50,15 @@ public class NativeDeletedCell extends NativeCell implements DeletedCell
     }
 
     @Override
-    public boolean isMarkedForDelete(long now)
+    public boolean isLive()
     {
-        return true;
+        return false;
     }
 
     @Override
-    public long getMarkedForDeleteAt()
+    public boolean isLive(long now)
     {
-        return timestamp();
+        return false;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/NativeExpiringCell.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/NativeExpiringCell.java b/src/java/org/apache/cassandra/db/NativeExpiringCell.java
index 0822fbd..fcadb16 100644
--- a/src/java/org/apache/cassandra/db/NativeExpiringCell.java
+++ b/src/java/org/apache/cassandra/db/NativeExpiringCell.java
@@ -76,15 +76,15 @@ public class NativeExpiringCell extends NativeCell implements ExpiringCell
     }
 
     @Override
-    public boolean isMarkedForDelete(long now)
+    public boolean isLive()
     {
-        return (int) (now / 1000) >= getLocalDeletionTime();
+        return isLive(System.currentTimeMillis());
     }
 
     @Override
-    public long getMarkedForDeleteAt()
+    public boolean isLive(long now)
     {
-        return timestamp();
+        return (int) (now / 1000) < getLocalDeletionTime();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/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 4f211f4..d0f3610 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -223,11 +223,8 @@ public class LazilyCompactedRow extends AbstractCompactedRow
                 if (indexer == SecondaryIndexManager.nullUpdater)
                     return;
 
-                if (!cell.isMarkedForDelete(System.currentTimeMillis())
-                    && !container.getColumn(cell.name()).equals(cell))
-                {
+                if (cell.isLive() && !container.getColumn(cell.name()).equals(cell))
                     indexer.remove(cell);
-                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java b/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
index 826f71a..56be8cf 100644
--- a/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
+++ b/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
@@ -271,7 +271,7 @@ public abstract class AbstractCellNameType extends AbstractCType implements Cell
             while (cells.hasNext())
             {
                 final Cell cell = cells.next();
-                if (cell.isMarkedForDelete(now))
+                if (!cell.isLive(now))
                     continue;
 
                 return new CQL3Row()
@@ -343,7 +343,7 @@ public abstract class AbstractCellNameType extends AbstractCType implements Cell
             while (cells.hasNext())
             {
                 Cell cell = cells.next();
-                if (cell.isMarkedForDelete(now))
+                if (!cell.isLive(now))
                     continue;
 
                 nextCell = cell;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 164c96f..b64d84f 100644
--- a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@ -31,7 +31,6 @@ import org.apache.cassandra.dht.LocalToken;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.concurrent.OpOrder;
-import org.apache.cassandra.utils.memory.MemtableAllocator;
 
 /**
  * Implements a secondary index for a column family using a second column family
@@ -89,7 +88,7 @@ public abstract class AbstractSimplePerColumnSecondaryIndex extends PerColumnSec
 
     public void delete(ByteBuffer rowKey, Cell cell, OpOrder.Group opGroup)
     {
-        if (cell.isMarkedForDelete(System.currentTimeMillis()))
+        if (!cell.isLive())
             return;
 
         DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, cell));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 39bc26b..36c7e1e 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -656,7 +656,7 @@ public class SecondaryIndexManager
 
         public void remove(Cell cell)
         {
-            if (cell.isMarkedForDelete(System.currentTimeMillis()))
+            if (!cell.isLive())
                 return;
 
             for (SecondaryIndex index : indexFor(cell.name()))
@@ -693,7 +693,7 @@ public class SecondaryIndexManager
 
         public void insert(Cell cell)
         {
-            if (cell.isMarkedForDelete(System.currentTimeMillis()))
+            if (!cell.isLive())
                 return;
 
             for (SecondaryIndex index : indexFor(cell.name()))
@@ -710,7 +710,7 @@ public class SecondaryIndexManager
             {
                 if (index instanceof PerColumnSecondaryIndex)
                 {
-                    if (!cell.isMarkedForDelete(System.currentTimeMillis()))
+                    if (cell.isLive())
                         ((PerColumnSecondaryIndex) index).update(key.getKey(), oldCell, cell, opGroup);
                     else
                         ((PerColumnSecondaryIndex) index).delete(key.getKey(), oldCell, opGroup);
@@ -720,7 +720,7 @@ public class SecondaryIndexManager
 
         public void remove(Cell cell)
         {
-            if (cell.isMarkedForDelete(System.currentTimeMillis()))
+            if (!cell.isLive())
                 return;
 
             for (SecondaryIndex index : indexFor(cell.name()))

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionKey.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionKey.java b/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionKey.java
index 2aff39d..2d25f8e 100644
--- a/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionKey.java
+++ b/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionKey.java
@@ -100,7 +100,7 @@ public class CompositesIndexOnCollectionKey extends CompositesIndex
     public boolean isStale(IndexedEntry entry, ColumnFamily data, long now)
     {
         CellName name = data.getComparator().create(entry.indexedEntryPrefix, columnDef, entry.indexValue.getKey());
-        Cell liveCell = data.getColumn(name);
-        return (liveCell == null || liveCell.isMarkedForDelete(now));
+        Cell cell = data.getColumn(name);
+        return cell == null || !cell.isLive(now);
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionValue.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionValue.java b/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionValue.java
index 67293aa..63589f4 100644
--- a/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionValue.java
+++ b/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnCollectionValue.java
@@ -48,7 +48,7 @@ public class CompositesIndexOnCollectionValue extends CompositesIndex
     public static CellNameType buildIndexComparator(CFMetaData baseMetadata, ColumnDefinition columnDef)
     {
         int prefixSize = columnDef.position();
-        List<AbstractType<?>> types = new ArrayList<AbstractType<?>>(prefixSize + 2);
+        List<AbstractType<?>> types = new ArrayList<>(prefixSize + 2);
         types.add(SecondaryIndex.keyComparator);
         for (int i = 0; i < prefixSize; i++)
             types.add(baseMetadata.comparator.subtype(i));
@@ -98,11 +98,7 @@ public class CompositesIndexOnCollectionValue extends CompositesIndex
     public boolean isStale(IndexedEntry entry, ColumnFamily data, long now)
     {
         CellName name = data.getComparator().create(entry.indexedEntryPrefix, columnDef, entry.indexedEntryCollectionKey);
-        Cell liveCell = data.getColumn(name);
-        if (liveCell == null || liveCell.isMarkedForDelete(now))
-            return true;
-
-        ByteBuffer liveValue = liveCell.value();
-        return ((CollectionType)columnDef.type).valueComparator().compare(entry.indexValue.getKey(), liveValue) != 0;
+        Cell cell = data.getColumn(name);
+        return cell == null || !cell.isLive(now) || ((CollectionType) columnDef.type).valueComparator().compare(entry.indexValue.getKey(), cell.value()) != 0;
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnRegular.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnRegular.java b/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnRegular.java
index 0cfd240..b9dc07f 100644
--- a/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnRegular.java
+++ b/src/java/org/apache/cassandra/db/index/composites/CompositesIndexOnRegular.java
@@ -90,11 +90,7 @@ public class CompositesIndexOnRegular extends CompositesIndex
     public boolean isStale(IndexedEntry entry, ColumnFamily data, long now)
     {
         CellName name = data.getComparator().create(entry.indexedEntryPrefix, columnDef);
-        Cell liveCell = data.getColumn(name);
-        if (liveCell == null || liveCell.isMarkedForDelete(now))
-            return true;
-
-        ByteBuffer liveValue = liveCell.value();
-        return columnDef.type.compare(entry.indexValue.getKey(), liveValue) != 0;
+        Cell cell = data.getColumn(name);
+        return cell == null || !cell.isLive(now) || columnDef.type.compare(entry.indexValue.getKey(), cell.value()) != 0;
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
index 22d4361..dbce024 100644
--- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
@@ -19,11 +19,7 @@ package org.apache.cassandra.db.index.composites;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.ArrayDeque;
-import java.util.Collection;
-import java.util.Deque;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -205,7 +201,7 @@ public class CompositesSearcher extends SecondaryIndexSearcher
                     {
                         Cell cell = indexCells.poll();
                         lastSeenPrefix = cell.name();
-                        if (cell.isMarkedForDelete(filter.timestamp))
+                        if (!cell.isLive(filter.timestamp))
                         {
                             logger.trace("skipping {}", cell.name());
                             continue;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java b/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
index e532a53..7cacb67 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
@@ -52,12 +52,8 @@ public class KeysIndex extends AbstractSimplePerColumnSecondaryIndex
 
     public boolean isIndexEntryStale(ByteBuffer indexedValue, ColumnFamily data, long now)
     {
-        Cell liveCell = data.getColumn(data.getComparator().makeCellName(columnDef.name.bytes));
-        if (liveCell == null || liveCell.isMarkedForDelete(now))
-            return true;
-
-        ByteBuffer liveValue = liveCell.value();
-        return columnDef.type.compare(indexedValue, liveValue) != 0;
+        Cell cell = data.getColumn(data.getComparator().makeCellName(columnDef.name.bytes));
+        return cell == null || !cell.isLive(now) || columnDef.type.compare(indexedValue, cell.value()) != 0;
     }
 
     public void validateOptions() throws ConfigurationException

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index d166c08..4055b7c 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -154,7 +154,7 @@ public class KeysSearcher extends SecondaryIndexSearcher
                     {
                         Cell cell = indexColumns.next();
                         lastSeenKey = cell.name();
-                        if (cell.isMarkedForDelete(filter.timestamp))
+                        if (!cell.isLive(filter.timestamp))
                         {
                             logger.trace("skipping {}", cell.name());
                             continue;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/service/CacheService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CacheService.java b/src/java/org/apache/cassandra/service/CacheService.java
index 048bad4..78f6d66 100644
--- a/src/java/org/apache/cassandra/service/CacheService.java
+++ b/src/java/org/apache/cassandra/service/CacheService.java
@@ -406,7 +406,7 @@ public class CacheService implements CacheServiceMBean
                     if (cf == null)
                         return null;
                     Cell cell = cf.getColumn(cellName);
-                    if (cell == null || cell.isMarkedForDelete(Long.MIN_VALUE))
+                    if (cell == null || !cell.isLive(Long.MIN_VALUE))
                         return null;
                     ClockAndCount clockAndCount = CounterContext.instance().getLocalClockAndCount(cell.value());
                     return Pair.create(CounterCacheKey.create(cfs.metadata.cfId, partitionKey, cellName), clockAndCount);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 3040aaf..069cec7 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -137,7 +137,7 @@ public class CassandraServer implements Cassandra.Iface
         ArrayList<ColumnOrSuperColumn> thriftColumns = new ArrayList<ColumnOrSuperColumn>(cells.size());
         for (Cell cell : cells)
         {
-            if (cell.isMarkedForDelete(now))
+            if (!cell.isLive(now))
                 continue;
 
             thriftColumns.add(thriftifyColumnWithName(cell, cell.name().toByteBuffer()));
@@ -176,7 +176,7 @@ public class CassandraServer implements Cassandra.Iface
         List<Column> thriftColumns = new ArrayList<Column>(cells.size());
         for (Cell cell : cells)
         {
-            if (cell.isMarkedForDelete(now))
+            if (!cell.isLive(now))
                 continue;
 
             thriftColumns.add(thriftifySubColumn(cell));
@@ -201,7 +201,7 @@ public class CassandraServer implements Cassandra.Iface
             ArrayList<ColumnOrSuperColumn> thriftSuperColumns = new ArrayList<ColumnOrSuperColumn>(cells.size());
             for (Cell cell : cells)
             {
-                if (cell.isMarkedForDelete(now))
+                if (!cell.isLive(now))
                     continue;
 
                 thriftSuperColumns.add(thriftifyColumnWithName(cell, SuperColumns.subName(cell.name())));
@@ -225,7 +225,7 @@ public class CassandraServer implements Cassandra.Iface
         SuperColumn current = null;
         for (Cell cell : cells)
         {
-            if (cell.isMarkedForDelete(now))
+            if (!cell.isLive(now))
                 continue;
 
             ByteBuffer scName = SuperColumns.scName(cell.name());
@@ -249,7 +249,7 @@ public class CassandraServer implements Cassandra.Iface
         CounterSuperColumn current = null;
         for (Cell cell : cells)
         {
-            if (cell.isMarkedForDelete(now))
+            if (!cell.isLive(now))
                 continue;
 
             ByteBuffer scName = SuperColumns.scName(cell.name());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/db/ColumnFamilyTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyTest.java b/test/unit/org/apache/cassandra/db/ColumnFamilyTest.java
index 7f8da96..151cbdc 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyTest.java
@@ -38,6 +38,7 @@ import static org.apache.cassandra.Util.column;
 import static org.apache.cassandra.Util.cellname;
 import static org.apache.cassandra.Util.tombstone;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 
 public class ColumnFamilyTest extends SchemaLoader
 {
@@ -184,9 +185,9 @@ public class ColumnFamilyTest extends SchemaLoader
 
         // check that tombstone wins timestamp ties
         cf_result.addTombstone(cellname("col1"), 0, 3);
-        assert cf_result.getColumn(cellname("col1")).isMarkedForDelete(System.currentTimeMillis());
+        assertFalse(cf_result.getColumn(cellname("col1")).isLive());
         cf_result.addColumn(cellname("col1"), val2, 3);
-        assert cf_result.getColumn(cellname("col1")).isMarkedForDelete(System.currentTimeMillis());
+        assertFalse(cf_result.getColumn(cellname("col1")).isLive());
 
         // check that column value wins timestamp ties in absence of tombstone
         cf_result.addColumn(cellname("col3"), val, 2);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/db/CounterCellTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/CounterCellTest.java b/test/unit/org/apache/cassandra/db/CounterCellTest.java
index efc365d..645c8a7 100644
--- a/test/unit/org/apache/cassandra/db/CounterCellTest.java
+++ b/test/unit/org/apache/cassandra/db/CounterCellTest.java
@@ -90,8 +90,8 @@ public class CounterCellTest extends SchemaLoader
         left  = new BufferDeletedCell(cellname("x"), 1, 1L);
         right = new BufferDeletedCell(cellname("x"), 2, 2L);
 
-        assert left.reconcile(right).getMarkedForDeleteAt() == right.getMarkedForDeleteAt();
-        assert right.reconcile(left).getMarkedForDeleteAt() == right.getMarkedForDeleteAt();
+        assert left.reconcile(right).timestamp() == right.timestamp();
+        assert right.reconcile(left).timestamp() == right.timestamp();
 
         // tombstone > live
         left  = new BufferDeletedCell(cellname("x"), 1, 2L);
@@ -119,7 +119,7 @@ public class CounterCellTest extends SchemaLoader
         assert reconciled.name() == right.name();
         assert reconciled.value() == right.value();
         assert reconciled.timestamp() == right.timestamp();
-        assert ((CounterCell)reconciled).timestampOfLastDelete() == left.getMarkedForDeleteAt();
+        assert ((CounterCell)reconciled).timestampOfLastDelete() == left.timestamp();
 
         // live < tombstone
         left  = BufferCounterCell.createLocal(cellname("x"), 0L, 1L, Long.MIN_VALUE);
@@ -147,7 +147,7 @@ public class CounterCellTest extends SchemaLoader
         assert reconciled.name() == left.name();
         assert reconciled.value() == left.value();
         assert reconciled.timestamp() == left.timestamp();
-        assert ((CounterCell)reconciled).timestampOfLastDelete() == right.getMarkedForDeleteAt();
+        assert ((CounterCell)reconciled).timestampOfLastDelete() == right.timestamp();
 
         // live < live last delete
         left  = new BufferCounterCell(cellname("x"), cc.createRemote(CounterId.fromInt(1), 2L, 3L), 1L, Long.MIN_VALUE);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/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 6ac5f13..ace0ae3 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -467,7 +467,7 @@ public class RangeTombstoneTest extends SchemaLoader
 
     private static boolean isLive(ColumnFamily cf, Cell c)
     {
-        return c != null && !c.isMarkedForDelete(System.currentTimeMillis()) && !cf.deletionInfo().isDeleted(c);
+        return c != null && c.isLive() && !cf.deletionInfo().isDeleted(c);
     }
 
     private static CellName b(int i)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/db/RemoveCellTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RemoveCellTest.java b/test/unit/org/apache/cassandra/db/RemoveCellTest.java
index 1624913..77ff02d 100644
--- a/test/unit/org/apache/cassandra/db/RemoveCellTest.java
+++ b/test/unit/org/apache/cassandra/db/RemoveCellTest.java
@@ -20,16 +20,14 @@ package org.apache.cassandra.db;
 
 import org.junit.Test;
 
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import org.apache.cassandra.db.filter.QueryFilter;
 
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.Util;
+import org.apache.cassandra.db.filter.QueryFilter;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
-
 public class RemoveCellTest extends SchemaLoader
 {
     @Test
@@ -52,7 +50,7 @@ public class RemoveCellTest extends SchemaLoader
         rm.apply();
 
         ColumnFamily retrieved = store.getColumnFamily(Util.namesQueryFilter(store, dk, "Column1"));
-        assert retrieved.getColumn(Util.cellname("Column1")).isMarkedForDelete(System.currentTimeMillis());
+        assertFalse(retrieved.getColumn(Util.cellname("Column1")).isLive());
         assertNull(Util.cloneAndRemoveDeleted(retrieved, Integer.MAX_VALUE));
         assertNull(Util.cloneAndRemoveDeleted(store.getColumnFamily(QueryFilter.getIdentityFilter(dk,
                                                                                                   "Standard1",
@@ -72,15 +70,15 @@ public class RemoveCellTest extends SchemaLoader
         long timestamp = System.currentTimeMillis();
         int localDeletionTime = (int) (timestamp / 1000);
         Cell c = dc("dc1", localDeletionTime, timestamp);
-        assertTrue("DeletedCell was not marked for delete", c.isMarkedForDelete(timestamp));
+        assertFalse("DeletedCell was not marked for delete", c.isLive(timestamp));
 
         // Simulate a node that is 30 seconds behind
         c = dc("dc2", localDeletionTime + 30, timestamp + 30000);
-        assertTrue("DeletedCell was not marked for delete", c.isMarkedForDelete(timestamp));
+        assertFalse("DeletedCell was not marked for delete", c.isLive(timestamp));
 
         // Simulate a node that is 30 ahead behind
         c = dc("dc3", localDeletionTime - 30, timestamp - 30000);
-        assertTrue("DeletedCell was not marked for delete", c.isMarkedForDelete(timestamp));
+        assertFalse("DeletedCell was not marked for delete", c.isLive(timestamp));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/db/RemoveSubCellTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RemoveSubCellTest.java b/test/unit/org/apache/cassandra/db/RemoveSubCellTest.java
index 6eee4a6..cec1bce 100644
--- a/test/unit/org/apache/cassandra/db/RemoveSubCellTest.java
+++ b/test/unit/org/apache/cassandra/db/RemoveSubCellTest.java
@@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.junit.Test;
 
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import org.apache.cassandra.db.composites.*;
 import org.apache.cassandra.db.filter.QueryFilter;
@@ -58,7 +59,7 @@ public class RemoveSubCellTest extends SchemaLoader
         rm.apply();
 
         ColumnFamily retrieved = store.getColumnFamily(QueryFilter.getIdentityFilter(dk, "Super1", System.currentTimeMillis()));
-        assert retrieved.getColumn(cname).isMarkedForDelete(System.currentTimeMillis());
+        assertFalse(retrieved.getColumn(cname).isLive());
         assertNull(Util.cloneAndRemoveDeleted(retrieved, Integer.MAX_VALUE));
     }
 
@@ -94,7 +95,7 @@ public class RemoveSubCellTest extends SchemaLoader
         rm.apply();
 
         ColumnFamily retrieved = store.getColumnFamily(filter);
-        assert retrieved.getColumn(cname).isMarkedForDelete(System.currentTimeMillis());
+        assertFalse(retrieved.getColumn(cname).isLive());
         assertNull(Util.cloneAndRemoveDeleted(retrieved, Integer.MAX_VALUE));
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/db/RowTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RowTest.java b/test/unit/org/apache/cassandra/db/RowTest.java
index 653c9f5..22e112e 100644
--- a/test/unit/org/apache/cassandra/db/RowTest.java
+++ b/test/unit/org/apache/cassandra/db/RowTest.java
@@ -32,6 +32,7 @@ import static org.apache.cassandra.Util.column;
 import static org.apache.cassandra.Util.tombstone;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 public class RowTest extends SchemaLoader
 {
@@ -101,12 +102,12 @@ public class RowTest extends SchemaLoader
     public void testExpiringColumnExpiration()
     {
         Cell c = new BufferExpiringCell(CellNames.simpleDense(ByteBufferUtil.bytes("one")), ByteBufferUtil.bytes("A"), 0, 1);
-        assert !c.isMarkedForDelete(System.currentTimeMillis());
+        assertTrue(c.isLive());
 
         // Because we keep the local deletion time with a precision of a
         // second, we could have to wait 2 seconds in worst case scenario.
         Uninterruptibles.sleepUninterruptibly(2, TimeUnit.SECONDS);
 
-        assert c.isMarkedForDelete(System.currentTimeMillis()) && c.getMarkedForDeleteAt() == 0;
+        assert !c.isLive() && c.timestamp() == 0;
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
index f9cfb2c..751e7ae 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
@@ -187,7 +187,7 @@ public class CompactionsPurgeTest extends SchemaLoader
         // We should have both the c1 and c2 tombstones still. Since the min timestamp in the c2 tombstone
         // sstable is older than the c1 tombstone, it is invalid to throw out the c1 tombstone.
         ColumnFamily cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key3, cfName, System.currentTimeMillis()));
-        assertFalse(cf.getColumn(cellname("c2")).isLive(System.currentTimeMillis()));
+        assertFalse(cf.getColumn(cellname("c2")).isLive());
         assertEquals(2, cf.getColumnCount());
     }
 
@@ -273,7 +273,7 @@ public class CompactionsPurgeTest extends SchemaLoader
         ColumnFamily cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key, cfName, System.currentTimeMillis()));
         assertEquals(10, cf.getColumnCount());
         for (Cell c : cf)
-            assert !c.isMarkedForDelete(System.currentTimeMillis());
+            assert c.isLive();
     }
 
     @Test
@@ -317,7 +317,7 @@ public class CompactionsPurgeTest extends SchemaLoader
         cf = cfs.getColumnFamily(filter);
         assertEquals(10, cf.getColumnCount());
         for (Cell c : cf)
-            assert !c.isMarkedForDelete(System.currentTimeMillis());
+            assert c.isLive();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
index 7eb899f..158dd2c 100644
--- a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
+++ b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
@@ -38,11 +38,8 @@ import org.apache.cassandra.db.filter.QueryFilter;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.concurrent.OpOrder;
-import org.apache.cassandra.utils.memory.MemtableAllocator;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 public class PerRowSecondaryIndexTest extends SchemaLoader
 {
@@ -96,9 +93,8 @@ public class PerRowSecondaryIndexTest extends SchemaLoader
         assertNotNull(indexedRow);
 
         for (Cell cell : indexedRow.getSortedColumns())
-        {
-            assertTrue(cell.isMarkedForDelete(System.currentTimeMillis()));
-        }
+            assertFalse(cell.isLive());
+
         assertTrue(Arrays.equals("k2".getBytes(), PerRowSecondaryIndexTest.TestIndex.LAST_INDEXED_KEY.array()));
     }
 
@@ -114,9 +110,8 @@ public class PerRowSecondaryIndexTest extends SchemaLoader
         ColumnFamily indexedRow = PerRowSecondaryIndexTest.TestIndex.LAST_INDEXED_ROW;
         assertNotNull(indexedRow);
         for (Cell cell : indexedRow.getSortedColumns())
-        {
-            assertTrue(cell.isMarkedForDelete(System.currentTimeMillis()));
-        }
+            assertFalse(cell.isLive());
+
         assertTrue(Arrays.equals("k3".getBytes(), PerRowSecondaryIndexTest.TestIndex.LAST_INDEXED_KEY.array()));
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4485e6db/test/unit/org/apache/cassandra/service/QueryPagerTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java
index ad70eff..abd030d 100644
--- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java
+++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java
@@ -165,7 +165,7 @@ public class QueryPagerTest extends SchemaLoader
         for (Cell c : r.cf)
         {
             // Ignore deleted cells if we have them
-            if (!c.isLive(0))
+            if (!c.isLive())
                 continue;
 
             ByteBuffer expected = names[i++];


Mime
View raw message