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

Memstore add cells - Avoid many garbage

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0, 1.3.0, 2.0.0
    • regionserver
    • None
    • Reviewed

    Description

      In HRegion# applyFamilyMapToMemstore()

      for (int i=0; i < listSize; i++) {
              Cell cell = cells.get(i);
              if (cell.getSequenceId() == 0) {
                CellUtil.setSequenceId(cell, mvccNum);
              }
              Pair<Long, Cell> ret = store.add(cell);
              size += ret.getFirst();
              if(isInReplay) {
                // set memstore newly added cells with replay mvcc number
                CellUtil.setSequenceId(ret.getSecond(), mvccNum);
              }
            }
      

      Previously we used to pass the added Cell reference to some HLog impl classes and later on the seqId used to get assigned. Now it looks totally changed. For normal put cells, the assign happen before adding to store.

      After addition we can see in replay mode again the mvccNum assign on returned cell.. This is not really needed as the seq of seqId assign and add to memstore is changed now.

      For the previous way we had to return added Cell also and that is why we were creating Pair object.Now we can avoid this so we can avoid creation of one Pair object and a wrapper Long object for every Cell add..

      Attachments

        1. HBASE-14721.patch
          11 kB
          Anoop Sam John
        2. HBASE-14721_branch-1.patch
          11 kB
          Anoop Sam John

        Activity

          People

            anoop.hbase Anoop Sam John
            anoop.hbase Anoop Sam John
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: