Class TestVisibilityScanDeleteTracker
VisibilityScanDeleteTracker never reports a delete marker as redundant.
HBASE-30036 added DeleteTracker.isRedundantDelete(ExtendedCell) so that minor compaction
can drop a delete marker already covered by a previously tracked delete of equal or broader
scope. The base ScanDeleteTracker
implements it purely from delete type / timestamp / qualifier, with no regard to visibility
labels.
On cell-visibility tables a delete marker only shadows cells whose visibility expression matches
(see VisibilityScanDeleteTracker.isDeleted(org.apache.hadoop.hbase.ExtendedCell)). Two markers carrying different labels cover
disjoint cells, so neither is redundant w.r.t. the other. Reusing the label-blind base logic
would wrongly declare such a marker redundant; minor compaction would then drop it and resurrect
cells that must stay deleted. VisibilityScanDeleteTracker must therefore conservatively
report no delete as redundant.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.hbase.ExtendedCelldeleteMarker(byte[] qualifier, long ts, org.apache.hadoop.hbase.KeyValue.Type type, byte[] label) voidA column-level delete must not be considered redundant just because a same-qualifier DeleteColumn with a higher timestamp was already tracked: if they carry different labels they shadow disjoint cells.voidA family-level delete must not be considered redundant just because a DeleteFamily with a higher timestamp set the family stamp: a label-less family delete only shadows label-less cells, while a labeled one shadows that label's cells.voidEven where the base answer would actually be correct (a label-less DeleteColumn covered by a label-less one of higher timestamp), the tracker still reports no redundancy, keeping the contract uniform across labeled and label-less markers.voidEven a same-label marker is kept: the basecoveredByColumnbranch would (safely) treat a same-qualifier, same-label DeleteColumn of lower timestamp as redundant, but the visibility tracker forgoes that optimization so the label-blind base logic can never run.
-
Field Details
-
ROW
-
FAMILY
-
QUALIFIER
-
LABEL_A
-
LABEL_B
-
-
Constructor Details
-
TestVisibilityScanDeleteTracker
public TestVisibilityScanDeleteTracker()
-
-
Method Details
-
differentLabelColumnDeleteIsNotRedundant
A column-level delete must not be considered redundant just because a same-qualifier DeleteColumn with a higher timestamp was already tracked: if they carry different labels they shadow disjoint cells. The base tracker'scoveredByColumnbranch would return true. -
differentLabelFamilyDeleteIsNotRedundant
A family-level delete must not be considered redundant just because a DeleteFamily with a higher timestamp set the family stamp: a label-less family delete only shadows label-less cells, while a labeled one shadows that label's cells. The base tracker'scoveredByFamilybranch would return true. -
sameLabelColumnDeleteIsNotRedundant
Even a same-label marker is kept: the basecoveredByColumnbranch would (safely) treat a same-qualifier, same-label DeleteColumn of lower timestamp as redundant, but the visibility tracker forgoes that optimization so the label-blind base logic can never run. This pins the deliberately conservative contract against a future change that re-enables it. -
labelLessColumnDeleteIsNotRedundant
Even where the base answer would actually be correct (a label-less DeleteColumn covered by a label-less one of higher timestamp), the tracker still reports no redundancy, keeping the contract uniform across labeled and label-less markers. -
deleteMarker
private static org.apache.hadoop.hbase.ExtendedCell deleteMarker(byte[] qualifier, long ts, org.apache.hadoop.hbase.KeyValue.Type type, byte[] label)
-