mirror of https://github.com/apache/cassandra
allow dropping columns shadowed by not-yet-expired supercolumn or row tombstones in PrecompactedRow
patch by jbellis; reviewed by slebresne for CASSANDRA-4396
This commit is contained in:
parent
5aad64a699
commit
5bcfcbc3ed
|
|
@ -1,4 +1,6 @@
|
|||
1.0.11
|
||||
* allow dropping columns shadowed by not-yet-expired supercolumn or row
|
||||
tombstones in PrecompactedRow (CASSANDRA-4396)
|
||||
* synchronize LCS getEstimatedTasks to avoid CME (CASSANDRA-4255)
|
||||
* ensure unique streaming session id's (CASSANDRA-4223)
|
||||
* kick off background compaction when min/max thresholds change
|
||||
|
|
|
|||
|
|
@ -251,13 +251,13 @@ public abstract class AbstractColumnContainer implements IColumnContainer, IIter
|
|||
}
|
||||
}
|
||||
|
||||
public boolean hasExpiredTombstones(int gcBefore)
|
||||
public boolean hasIrrelevantData(int gcBefore)
|
||||
{
|
||||
if (isMarkedForDelete() && getLocalDeletionTime() < gcBefore)
|
||||
return true;
|
||||
|
||||
for (IColumn column : columns)
|
||||
if (column.hasExpiredTombstones(gcBefore))
|
||||
if (column.mostRecentLiveChangeAt() < getLocalDeletionTime() || column.hasIrrelevantData(gcBefore))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ public class Column implements IColumn
|
|||
valueValidator.validate(value());
|
||||
}
|
||||
|
||||
public boolean hasExpiredTombstones(int gcBefore)
|
||||
public boolean hasIrrelevantData(int gcBefore)
|
||||
{
|
||||
return isMarkedForDelete() && getLocalDeletionTime() < gcBefore;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public interface IColumn
|
|||
/**
|
||||
* @return true if the column or any its subcolumns expired before @param gcBefore
|
||||
*/
|
||||
public boolean hasExpiredTombstones(int gcBefore);
|
||||
public boolean hasIrrelevantData(int gcBefore);
|
||||
|
||||
/**
|
||||
* For a standard column, this is the same as timestamp().
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public interface IColumnContainer
|
|||
|
||||
public boolean isMarkedForDelete();
|
||||
public long getMarkedForDeleteAt();
|
||||
public boolean hasExpiredTombstones(int gcBefore);
|
||||
public boolean hasIrrelevantData(int gcBefore);
|
||||
|
||||
public AbstractType getComparator();
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class PrecompactedRow extends AbstractCompactedRow
|
|||
// taking this into account.
|
||||
Boolean shouldPurge = null;
|
||||
|
||||
if (cf.hasExpiredTombstones(controller.gcBefore))
|
||||
if (cf.hasIrrelevantData(controller.gcBefore))
|
||||
shouldPurge = controller.shouldPurge(key);
|
||||
ColumnFamily compacted = shouldPurge != null && shouldPurge
|
||||
? ColumnFamilyStore.removeDeleted(cf, controller.gcBefore)
|
||||
|
|
|
|||
Loading…
Reference in New Issue