private boolean isOffsetUnderCompaction(Offset offset) {
    List<LogSegmentName> segmentsUnderCompaction = compactionLog.getCompactionDetails().getLogSegmentsUnderCompaction();
    LogSegment first = srcLog.getSegment(segmentsUnderCompaction.get(0));
    LogSegment last = srcLog.getSegment(segmentsUnderCompaction.get(segmentsUnderCompaction.size() - 1));
    Offset start = new Offset(first.getName(), first.getStartOffset());
    Offset end = new Offset(last.getName(), last.getEndOffset());
    return new FileSpan(start, end).inSpan(offset);
  }
@param offset the {@link Offset} to check
@return {@code true} if the offset is being compacted in the current cycle.
ambry-store/src/main/java/com/github/ambry/store/BlobStoreCompactor.java