kowshik commented on a change in pull request #10280: URL: https://github.com/apache/kafka/pull/10280#discussion_r602056487
########## File path: core/src/main/scala/kafka/log/Log.scala ########## @@ -1794,20 +1269,21 @@ class Log(@volatile private var _dir: File, ret.toSeq.sortBy(-_) } - /** - * Given a message offset, find its corresponding offset metadata in the log. - * If the message offset is out of range, throw an OffsetOutOfRangeException - */ - private def convertToOffsetMetadataOrThrow(offset: Long): LogOffsetMetadata = { - val fetchDataInfo = read(offset, - maxLength = 1, - isolation = FetchLogEnd, - minOneMessage = false) - fetchDataInfo.fetchOffsetMetadata + def convertToOffsetMetadata(offset: Long): Option[LogOffsetMetadata] = { Review comment: Done. Removed now. Good catch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org