YutaLin commented on code in PR #19630:
URL: https://github.com/apache/kafka/pull/19630#discussion_r2080817081


##########
core/src/main/scala/kafka/server/AbstractFetcherThread.scala:
##########
@@ -204,11 +214,27 @@ abstract class AbstractFetcherThread(name: String,
    * occur during truncation.
    */
   private def truncateToEpochEndOffsets(latestEpochsForPartitions: 
Map[TopicPartition, EpochData]): Unit = {
-    val endOffsets = leader.fetchEpochEndOffsets(latestEpochsForPartitions)
-    //Ensure we hold a lock during truncation.
+
+    val partitionsMap = new java.util.HashMap[TopicPartition, 
OffsetForLeaderPartition]()
+
+    // Fill it with converted values
+    latestEpochsForPartitions.foreach { case (tp, epochData) =>

Review Comment:
   Hi @chia7712, I updated it, but I'd like to ask what the benefit of using 
`asJava` here.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to