ijuma commented on code in PR #13040:
URL: https://github.com/apache/kafka/pull/13040#discussion_r1101480397


##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -680,20 +680,20 @@ class UnifiedLog(@volatile var logStartOffset: Long,
   }
 
   private[log] def activeProducersWithLastSequence: Map[Long, Int] = lock 
synchronized {
-    producerStateManager.activeProducers.map { case (producerId, 
producerIdEntry) =>
-      (producerId, producerIdEntry.lastSeq)
+    producerStateManager.activeProducers.asScala.map { case (producerId, 
producerIdEntry) =>
+      (producerId.toLong, producerIdEntry.lastSeq)
     }
-  }
+  }.toMap

Review Comment:
   I realized, but since we are creating a new map in this method, I don't see 
why an immutable Map is needed. Can we just change the result type to be 
`collection.Map`?



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