private void doAddOrUpsert(ExtendedCell cell, long readpoint, MemStoreSizing memstoreSizing,
    boolean doAdd) {
    MutableSegment currentActive;
    boolean succ = false;
    while (!succ) {
      currentActive = getActive();
      succ = preUpdate(currentActive, cell, memstoreSizing);
      if (succ) {
        if (doAdd) {
          doAdd(currentActive, cell, memstoreSizing);
        } else {
          doUpsert(currentActive, cell, readpoint, memstoreSizing);
        }
        postUpdate(currentActive);
      }
    }
  }
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