Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16888

Avoid unnecessary tags copy in Append

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.0.0
    • 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);
      
      

      Attachments

        1. HBASE-16888.v0.patch
          2 kB
          Chia-Ping Tsai
        2. HBASE-16888.v1.patch
          5 kB
          Chia-Ping Tsai
        3. HBASE-16888.v1.patch
          5 kB
          Chia-Ping Tsai

        Activity

          People

            chia7712 Chia-Ping Tsai
            chia7712 Chia-Ping Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: