Ignore sstables with only ttl deletions which are not currently expired.

This commit is contained in:
Periklis Stavrou 2019-10-16 13:30:20 +03:00
parent c55d727bbe
commit 88016504e1
1 changed files with 2 additions and 2 deletions

View File

@ -1993,8 +1993,8 @@ public abstract class SSTableReader extends SSTable implements SelfRefCounted<SS
public boolean mayHaveTombstones()
{
// A sstable is guaranteed to have no tombstones if minLocalDeletionTime is still set to its default,
// Cell.NO_DELETION_TIME, which is bigger than any valid deletion times.
return getMinLocalDeletionTime() != Cell.NO_DELETION_TIME;
// Cell.NO_DELETION_TIME, which is bigger than any valid deletion times, or bigger than current time (for ttl only tombstones).
return getMinLocalDeletionTime() != Cell.NO_DELETION_TIME && getMinLocalDeletionTime() < System.currentTimeMillis()/1000;
}
public int getMinTTL()