public TimestampOffset lookup(long targetTimestamp) {
        return maybeLock(lock, () -> {
            ByteBuffer idx = mmap().duplicate();
            int slot = largestLowerBoundSlotFor(idx, targetTimestamp, IndexSearchType.KEY);
            if (slot == -1)
                return new TimestampOffset(RecordBatch.NO_TIMESTAMP, baseOffset());
            else
                return parseEntry(idx, slot);
        });
    }
Find the time index entry whose timestamp is less than or equal to the given timestamp.
If the target timestamp is smaller than the least timestamp in the time index, (NoTimestamp, baseOffset) is
returned.

@param targetTimestamp The timestamp to look up.
@return The time index entry found.
storage/src/main/java/org/apache/kafka/storage/internals/log/TimeIndex.java