divijvaidya commented on code in PR #13096:
URL: https://github.com/apache/kafka/pull/13096#discussion_r1067064604


##########
core/src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala:
##########
@@ -106,7 +106,7 @@ class LeaderEpochFileCache(topicPartition: TopicPartition,
       entry.epoch >= newEntry.epoch || entry.startOffset >= 
newEntry.startOffset
     }
 
-    if (removedEpochs.size > 1
+    if (removedEpochs.lengthCompare(1) > 0

Review Comment:
   FYI reviewers -
   removedEpochs is a scala Seq, hence, lengthCompare() is beneficial.



-- 
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]

Reply via email to