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 2022/12/23 16:23:31 UTC

[GitHub] [kafka] ijuma commented on a diff in pull request #13043: [Draft] Move ProducerStateManager auxiliary classes to storage module.

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


##########
core/src/main/scala/kafka/log/LogCleaner.scala:
##########
@@ -681,9 +681,10 @@ private[log] class Cleaner(val id: Int,
           // 3) The last entry in the log is a transaction marker. We retain this marker since it has the
           //    last producer epoch, which is needed to ensure fencing.
           lastRecordsOfActiveProducers.get(batch.producerId).exists { lastRecord =>
-            lastRecord.lastDataOffset match {
-              case Some(offset) => batch.lastOffset == offset
-              case None => batch.isControlBatch && batch.producerEpoch == lastRecord.producerEpoch
+            if(lastRecord.lastDataOffset.isPresent) {

Review Comment:
   Nit: space after `if`.



-- 
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-unsubscribe@kafka.apache.org

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