public void close() {
    if (this.memStoreLAB != null) {
      this.memStoreLAB.close();
    }
    // do not set MSLab to null as scanners may still be reading the data here and need to decrease
    // the counter when they finish
  }
Closing a segment before it is being discarded
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Segment.java