[ https://issues.apache.org/jira/browse/HBASE-17734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15898576#comment-15898576 ]
Anoop Sam John commented on HBASE-17734: ---------------------------------------- +1 > Guard against possibly copying the qualifier in the ScanDeleteTracker > --------------------------------------------------------------------- > > Key: HBASE-17734 > URL: https://issues.apache.org/jira/browse/HBASE-17734 > Project: HBase > Issue Type: Improvement > Reporter: CHIA-PING TSAI > Assignee: CHIA-PING TSAI > Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17734.v0.patch, HBASE-17734.v1.patch, > HBASE-17734.v2.patch > > > If the input cell is ByteBufferKeyValue, the > ByteBufferKeyValue#getQualifierArray will copy the qualifier bytes. > ScanDeleteTracker should keep the cell rather than qualifier array. > {noformat} > 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. > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)