Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
2.0.0
-
None
-
None
Description
a) If the delta has tags and the mutation doesn’t apply the TTL, we shouldn’t create the TagRewriteCell.
List<Tag> tags = TagUtil.carryForwardTags(delta); long ts = now; Cell newCell = null; byte [] row = mutation.getRow(); if (currentValue != null) { ... } else { // Append's KeyValue.Type==Put and ts==HConstants.LATEST_TIMESTAMP CellUtil.updateLatestStamp(delta, now); newCell = delta; tags = TagUtil.carryForwardTTLTag(tags, mutation.getTTL()); if (tags != null) { newCell = CellUtil.createCell(delta, tags); } }
b) If the cell has tags, the ShareableMemoryTagRewriteCell will make duplicate copy of tags.
Cell clonedBaseCell = ((ShareableMemory) this.cell).cloneToCell(); return new TagRewriteCell(clonedBaseCell, this.tags);