void onRegionClose(byte[] encodedRegionName) {
    synchronized (tieLock) {
      this.lowestUnflushedSequenceIds.remove(encodedRegionName);
      Map<ImmutableByteArray, Long> flushing = this.flushingSequenceIds.remove(encodedRegionName);
      if (flushing != null) {
        LOG.warn("Still have flushing records when closing {}, {}",
          Bytes.toString(encodedRegionName),
          flushing.entrySet().stream().map(e -> e.getKey().toString() + "->" + e.getValue())
            .collect(Collectors.joining(",", "{", "}")));
      }
    }
    this.highestSequenceIds.remove(encodedRegionName);
  }
Clear all the records of the given region as it is going to be closed.
<p/>
We will call this once we get the region close marker. We need this because that, if we use
Durability.ASYNC_WAL, after calling startCacheFlush, we may still get some ongoing wal entries
that has not been processed yet, this will lead to orphan records in the
lowestUnflushedSequenceIds and then cause too many WAL files.
<p/>
See HBASE-23157 for more details.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SequenceIdAccounting.java