void awaitTermination() {
    if (compactionExecutor != null && compactionThread != null) {
      try {
        compactionThread.join(2000);
      } catch (InterruptedException e) {
        metrics.compactionManagerTerminateErrorCount.inc();
        logger.error("Compaction thread join wait for {} was interrupted", mountPath);
      }
    }
  }
Awaits the termination of all pending jobs of the compaction manager.
ambry-store/src/main/java/com/github/ambry/store/CompactionManager.java