/**
  * * Add memStoreSize to replayEditsPerRegion.
  *
  * @param regionName region name.
  * @param memStoreSize the Memstore size will be added to replayEditsPerRegion.
  */
 public void addRegionReplayEditsSize(byte[] regionName, MemstoreSize memStoreSize) {
   MemstoreSize replayEdistsSize = replayEditsPerRegion.get(regionName);
   // All ops on the same MemstoreSize object is going to be done by single thread, sequentially
   // only. First calls to this method to increment the per region reply edits size and then call
   // to either rollbackRegionReplayEditsSize or clearRegionReplayEditsSize as per the result of
   // the region open operation. No need to handle multi thread issues on one region's entry in
   // this Map.
   if (replayEdistsSize == null) {
     replayEdistsSize = new MemstoreSize();
     replayEditsPerRegion.put(regionName, replayEdistsSize);
   }
   replayEdistsSize.incMemstoreSize(memStoreSize);
 }
 public void decGlobalMemstoreSize(MemstoreSize memStoreSize) {
   globalMemstoreDataSize.addAndGet(-memStoreSize.getDataSize());
   globalMemstoreHeapOverhead.addAndGet(-memStoreSize.getHeapOverhead());
 }