nileshkumar3 commented on code in PR #23780:
URL: https://github.com/apache/kafka/pull/23780#discussion_r4437123365
##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -1464,7 +1463,7 @@ class Partition(val topicPartition: TopicPartition,
def getOffsetByTimestamp: OffsetResultHolder = {
logManager.getLog(topicPartition)
- .map(log => log.fetchOffsetByTimestamp(timestamp,
remoteLogManager.asInstanceOf[Option[AsyncOffsetReader]].toJava))
+ .map(log => log.fetchOffsetByTimestamp(timestamp,
remoteLogManager.asInstanceOf[Option[AsyncOffsetReader]].toJava,
lastFetchableOffset))
Review Comment:
Done. Removed the bounding check in ReplicaManager, since the log search is
now bounded.
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java:
##########
@@ -1770,10 +1785,11 @@ public OffsetResultHolder fetchOffsetByTimestamp(long
targetTimestamp, Optional<
AsyncOffsetReadFutureHolder<OffsetResultHolder.FileRecordsOrError>
asyncOffsetReadFutureHolder =
remoteOffsetReader.get().asyncOffsetRead(topicPartition(), targetTimestamp,
- logStartOffset, leaderEpochCache, () ->
searchOffsetInLocalLog(targetTimestamp, localLogStartOffset()));
+ logStartOffset, leaderEpochCache,
+ () ->
searchOffsetInLocalLog(targetTimestamp, localLogStartOffset(),
lastFetchableOffset));
Review Comment:
Fixed
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]