void splitCurrentCycle(LogSegmentName nextCycleStartSegment) {
    CompactionDetails currentDetails = getCurrentCycleLog().compactionDetails;
    List<LogSegmentName> updatedList = new ArrayList<>();
    List<LogSegmentName> newList = new ArrayList<>();
    boolean encounteredSplitPoint = false;
    for (LogSegmentName segmentUnderCompaction : currentDetails.getLogSegmentsUnderCompaction()) {
      if (!encounteredSplitPoint && !segmentUnderCompaction.equals(nextCycleStartSegment)) {
        updatedList.add(segmentUnderCompaction);
      } else {
        encounteredSplitPoint = true;
        newList.add(segmentUnderCompaction);
      }
    }
    getCurrentCycleLog().compactionDetails =
        new CompactionDetails(currentDetails.getReferenceTimeMs(), updatedList, null);
    cycleLogs.add(new CycleLog(new CompactionDetails(currentDetails.getReferenceTimeMs(), newList, null)));
    flush();
    logger.trace("{}: Split current cycle into two lists: {} and {}", file, updatedList, newList);
  }
Splits the current cycle at {@code nextCycleStartSegment}. This means that a new next cycle will be created that
starts at {@code nextCycleStartSegment} and ends at the end segment of the current cycle and the new current cycle
starts at the first segment in the current cycle and ends at the segment just before {@code nextCycleStartSegment}.
For e.g if the current cycle is 0_1.log,0_2.log,0_3.log,0_4.log,0_5.log and {@code nextCycleStartSegment} is
0_4.log, the new next cycle will be 0_4.log,0_5.log and the new current cycle will be 0_1.log,0_2.log,0_3.log.
{@link CompactionLog}
@param nextCycleStartSegment the segment to split the current cycle at.
ambry-store/src/main/java/com/github/ambry/store/CompactionLog.java