public Optional<LogSegment> firstSegment() {
        return firstEntry().map(Map.Entry::getValue);
    }
Return the log segment associated with the smallest offset, if it exists.

This method is thread-safe.
storage/src/main/java/org/apache/kafka/storage/internals/log/LogSegments.java