void closeLastLogSegmentIfQualified() throws StoreException {
    synchronized (storeWriteLock) {
      if (compactor.closeLastLogSegmentIfQualified()) {
        //refresh journal.
        long startTime = SystemTime.getInstance().milliseconds();
        index.journal.cleanUpJournal();
        logger.debug("Time to clean up journal size for store : {} in dataDir: {} is {} ms", storeId, dataDir,
            SystemTime.getInstance().milliseconds() - startTime);
      }
    }
  }
Closes the last log segment periodically if replica is in sealed status.
Hybrid compaction policy will support both statsBasedCompactionPolicy and compactAllPolicy.
Make sure this method is running before compactAllPolicy so it will compact the auto closed log segment afterwards.
@throws StoreException if any store exception occurred as part of ensuring capacity.
ambry-store/src/main/java/com/github/ambry/store/BlobStore.java