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


##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -686,7 +687,9 @@ class UnifiedLog(@volatile var logStartOffset: Long,
   private[log] def lastRecordsOfActiveProducers: Map[Long, LastRecord] = lock 
synchronized {
     producerStateManager.activeProducers.map { case (producerId, 
producerIdEntry) =>
       val lastDataOffset = if (producerIdEntry.lastDataOffset >= 0 ) 
Some(producerIdEntry.lastDataOffset) else None

Review Comment:
   It seems that we can create the `Optional` here since we immediately discard 
this `Option` a couple of lines below.



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