private void finishCompactionRequest(CompactionRequestImpl cr) {
    this.region.reportCompactionRequestEnd(cr.isMajor(), cr.getFiles().size(), cr.getSize());
    if (cr.isOffPeak()) {
      offPeakCompactionTracker.set(false);
      cr.setOffPeak(false);
    }
    synchronized (filesCompacting) {
      filesCompacting.removeAll(cr.getFiles());
    }
    // The tracker could be null, for example, we do not need to track the creation of store file
    // writer due to different implementation of SFT, or the compaction is canceled.
    if (cr.getWriterCreationTracker() != null) {
      storeFileWriterCreationTrackers.remove(cr.getWriterCreationTracker());
    }
  }
Adds the files to compacting files. filesCompacting must be locked.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java