List<LogSegmentName> getLogSegmentsNotInJournal() {
    LogSegment logSegment = log.getFirstSegment();
    List<LogSegmentName> logSegmentNamesToReturn = new ArrayList<>();
    while (log.getNextSegment(logSegment) != null && validIndexSegments.size() > 0) {
      logSegmentNamesToReturn.add(logSegment.getName());
      logSegment = log.getNextSegment(logSegment);
    }
    if (journal.getCurrentNumberOfEntries() != 0) {
      Offset firstOffsetInJournal = journal.getFirstOffset();
      int index = logSegmentNamesToReturn.indexOf(firstOffsetInJournal.getName());
      if (index != -1) {
        logSegmentNamesToReturn = logSegmentNamesToReturn.subList(0, index);
      }
    }
    //if logSegmentNamesToReturn size equals 0, should return null to avoid through IllegalArgumentException in CompactionDetails.
    return logSegmentNamesToReturn.size() > 0 ? logSegmentNamesToReturn : null;
  }
Fetches {@link LogSegment} names whose entries don't over lap with {@link Journal}. Returns {@code null}
if there aren't any
@return a {@link List<String>} of {@link LogSegment} names whose entries don't overlap with {@link Journal}.
{@code null} if there aren't any
ambry-store/src/main/java/com/github/ambry/store/PersistentIndex.java