@Override
    public LogSegment activeSegment() {
        synchronized (this) {
            return activeSegment;
        }
    }
Its [[LogSegment.baseOffset]] will always be the largest one among all segments.
core/src/main/scala/kafka/log/streamaspect/CachedLogSegments.java