You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/13 05:04:14 UTC

[GitHub] [kafka] ijuma commented on a change in pull request #10684: MINOR: Improve Log layer segment iteration logic and few other areas

ijuma commented on a change in pull request #10684:
URL: https://github.com/apache/kafka/pull/10684#discussion_r631564915



##########
File path: core/src/main/scala/kafka/log/LogSegments.scala
##########
@@ -185,7 +184,7 @@ class LogSegments(topicPartition: TopicPartition) {
    *         if it exists.
    */
   @threadsafe
-  def higherEntry(offset: Long): Option[Map.Entry[JLong, LogSegment]] = Option(segments.higherEntry(offset))
+  def higherEntry(offset: Long): Option[Map.Entry[Long, LogSegment]] = Option(segments.higherEntry(offset))

Review comment:
       Why do we use `Map.Entry` instead of tuple here? Is it to avoid the allocation?




-- 
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:
users@infra.apache.org