Source:
<code>void resumeCompaction(byte[] bundleReadBuffer) throws StoreException { this.bundleReadBuffer = bundleReadBuffer; if (srcIndex == null) { throw new IllegalStateException("Compactor has not been initialized"); } else if (compactionLog == null) { throw new IllegalStateException("There is no compaction to resume"); } logger.trace("resumeCompaction() started for {}", storeId); runningLatch = new CountDownLatch(1); compactionInProgress.set(true); selectedContainers.clear(); <START> getAllContainersByStatus(EnumSet.of(Container.ContainerStatus.INACTIVE, Container.ContainerStatus.DELETE_IN_PROGRESS)); <END> try { while (isActive && !compactionLog.getCompactionPhase().equals(CompactionLog.Phase.DONE)) { CompactionLog.Phase phase = compactionLog.getCompactionPhase(); logger.debug("Starting cycle to compact in {}", compactionLog.getCompactionDetails(), storeId); switch (phase) { case PREPARE: logger.debug("Compaction PREPARE started for in {}", compactionLog.getCompactionDetails(), storeId); compactionLog.markCopyStart(); case COPY: logger.debug("Compaction COPY started for in {}", compactionLog.getCompactionDetails(), storeId); copy(); if (isActive) { compactionLog.markCommitStart(); logger.debug("Compaction COMMIT started for in {}", compactionLog.getCompactionDetails(), storeId); commit(false); compactionLog.markCleanupStart(); logger.debug("Compaction CLEANUP started for in {}", compactionLog.getCompactionDetails(), storeId); waitTillRefCountZero(); logger.debug("Wait for ref count to go to 0 has been finished in {}", compactionLog.getCompactionDetails(), storeId); cleanup(false); logger.debug("Completing for in {}", compactionLog.getCompactionDetails(), storeId); compactionLog.markCycleComplete(); } break; default: throw new IllegalStateException("Illegal compaction phase: " + phase); } } endCompaction(); } catch (InterruptedException | IOException e) { throw new StoreException("Exception during compaction", e, StoreErrorCodes.Unknown_Error); } finally { compactionInProgress.set(false); runningLatch.countDown(); logger.trace("resumeCompaction() ended for {}", storeId); } this.bundleReadBuffer = null; }</code><technical_language>log selectedContainers info log running compaction</technical_language>

Target:
void resumeCompaction(byte[] bundleReadBuffer) throws StoreException { this.bundleReadBuffer = bundleReadBuffer; if (srcIndex == null) { throw new IllegalStateException("Compactor has not been initialized"); } else if (compactionLog == null) { throw new IllegalStateException("There is no compaction to resume"); } logger.trace("resumeCompaction() started for {}", storeId); runningLatch = new CountDownLatch(1); compactionInProgress.set(true); if (config.storeContainerDeletionEnabled) { getDeprecatedContainers(); logger.info("Deprecated containers are for {}", deprecatedContainers, storeId); } try { while (isActive && !compactionLog.getCompactionPhase().equals(CompactionLog.Phase.DONE)) { CompactionLog.Phase phase = compactionLog.getCompactionPhase(); logger.debug("Starting cycle to compact in {}", compactionLog.getCompactionDetails(), storeId); switch (phase) { case PREPARE: logger.debug("Compaction PREPARE started for in {}", compactionLog.getCompactionDetails(), storeId); compactionLog.markCopyStart(); case COPY: logger.debug("Compaction COPY started for in {}", compactionLog.getCompactionDetails(), storeId); copy(); if (isActive) { compactionLog.markCommitStart(); logger.debug("Compaction COMMIT started for in {}", compactionLog.getCompactionDetails(), storeId); commit(false); compactionLog.markCleanupStart(); logger.debug("Compaction CLEANUP started for in {}", compactionLog.getCompactionDetails(), storeId); waitTillRefCountZero(); logger.debug("Wait for ref count to go to 0 has been finished in {}", compactionLog.getCompactionDetails(), storeId); cleanup(false); logger.debug("Completing for in {}", compactionLog.getCompactionDetails(), storeId); compactionLog.markCycleComplete(); } break; default: throw new IllegalStateException("Illegal compaction phase: " + phase); } } endCompaction(); } catch (InterruptedException | IOException e) { throw new StoreException("Exception during compaction", e, StoreErrorCodes.Unknown_Error); } finally { compactionInProgress.set(false); runningLatch.countDown(); logger.trace("resumeCompaction() ended for {}", storeId); } this.bundleReadBuffer = null; }