private SortedMap<Offset, Offset> getBeforeAndAfterIndexSegmentOffsetsForLogSegments(
      List<LogSegmentName> logSegmentNames) {
    if (logSegmentNames.size() == 0) {
      return new TreeMap<>();
    }

    Offset start = new Offset(logSegmentNames.get(0), 0);
    Offset end = new Offset(logSegmentNames.get(logSegmentNames.size() - 1), config.storeSegmentSizeInBytes);
    return beforeAndAfterIndexSegmentOffsets.subMap(start, end);
  }
Return index segment offset map for current cycle. Each key offset's LogSegmentName has to be in current cycle.
ambry-store/src/main/java/com/github/ambry/store/CompactionLog.java