protected void doAdd(MutableSegment currentActive, ExtendedCell cell,
    MemStoreSizing memstoreSizing) {
    ExtendedCell toAdd = maybeCloneWithAllocator(currentActive, cell, false);
    boolean mslabUsed = (toAdd != cell);
    // This cell data is backed by the same byte[] where we read request in RPC(See
    // HBASE-15180). By default, MSLAB is ON and we might have copied cell to MSLAB area. If
    // not we must do below deep copy. Or else we will keep referring to the bigger chunk of
    // memory and prevent it from getting GCed.
    // Copy to MSLAB would not have happened if
    // 1. MSLAB is turned OFF. See "hbase.hregion.memstore.mslab.enabled"
    // 2. When the size of the cell is bigger than the max size supported by MSLAB. See
    // "hbase.hregion.memstore.mslab.max.allocation". This defaults to 256 KB
    // 3. When cells are from Append/Increment operation.
    if (!mslabUsed) {
      toAdd = deepCopyIfNeeded(toAdd);
    }
    internalAdd(currentActive, toAdd, mslabUsed, memstoreSizing);
  }
Updates the wal with the lowest sequence id (oldest entry) that is still in memory
@param onlyIfMoreRecent a flag that marks whether to update the sequence id no matter what or
                        only if it is greater than the previous sequence id
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java