Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
If the input cell is ByteBufferKeyValue, the ByteBufferKeyValue#getQualifierArray will copy the qualifier bytes.
ScanDeleteTracker should keep the cell rather than qualifier array.
public void add(Cell cell) { long timestamp = cell.getTimestamp(); byte type = cell.getTypeByte(); if (!hasFamilyStamp || timestamp > familyStamp) { if (type == KeyValue.Type.DeleteFamily.getCode()) { hasFamilyStamp = true; familyStamp = timestamp; return; } else if (type == KeyValue.Type.DeleteFamilyVersion.getCode()) { familyVersionStamps.add(timestamp); return; } if (deleteBuffer != null && type < deleteType) { // same column, so ignore less specific delete if (CellUtil.matchingQualifier(cell, deleteBuffer, deleteOffset, deleteLength)) { return; } } // new column, or more general delete type deleteBuffer = cell.getQualifierArray(); deleteOffset = cell.getQualifierOffset(); deleteLength = cell.getQualifierLength(); deleteType = type; deleteTimestamp = timestamp; } // missing else is never called. }