private void doUpsert(MutableSegment currentActive, ExtendedCell cell, long readpoint,
    MemStoreSizing memstoreSizing) {
    // Add the Cell to the MemStore
    // Use the internalAdd method here since we
    // (a) already have a lock and
    // (b) cannot safely use the MSLAB here without potentially hitting OOME
    // - see TestMemStore.testUpsertMSLAB for a test that triggers the pathological case if we don't
    // avoid MSLAB here.
    // This cell data is backed by the same byte[] where we read request in RPC(See
    // HBASE-15180). We must do below deep copy. Or else we will keep referring to the bigger
    // chunk of memory and prevent it from getting GCed.
    cell = deepCopyIfNeeded(cell);
    boolean sizeAddedPreOperation = sizeAddedPreOperation();
    currentActive.upsert(cell, readpoint, memstoreSizing, sizeAddedPreOperation);
    setOldestEditTimeToNow();
  }
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