You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "CHIA-PING TSAI (JIRA)" <ji...@apache.org> on 2017/03/04 22:16:45 UTC
[jira] [Assigned] (HBASE-17734) guard against possibly coping the
qualifier in the ScanDeleteTracker
[ https://issues.apache.org/jira/browse/HBASE-17734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
CHIA-PING TSAI reassigned HBASE-17734:
--------------------------------------
Assignee: CHIA-PING TSAI
> guard against possibly coping 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
>
>
> 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)