private void pushTailToSnapshot() {
    VersionedSegmentsList segments = pipeline.getVersionedTail();
    pushToSnapshot(segments.getStoreSegments());
    // In Swap: don't close segments (they are in snapshot now) and don't update the region size
    pipeline.swap(segments, null, false, false);
  }
NOTE: When {@link CompactingMemStore#flushInMemory(MutableSegment)} calls this method, due to
concurrent writes and because we first add cell size to currActive.getDataSize and then
actually add cell to currActive.cellSet, it is possible that currActive.getDataSize could not
accommodate cellToAdd but currActive.cellSet is still empty if pending writes which not yet add
cells to currActive.cellSet,so for
{@link CompactingMemStore#flushInMemory(MutableSegment)},checkEmpty parameter is false. But if
{@link CompactingMemStore#snapshot} called this method,because there is no pending
write,checkEmpty parameter could be true.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java