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 2020/12/10 23:16:55 UTC

[GitHub] [kafka] junrao commented on a change in pull request #9718: KAFKA-10832: Fix Log to use the correct ProducerStateManager instance when updating producers

junrao commented on a change in pull request #9718:
URL: https://github.com/apache/kafka/pull/9718#discussion_r540571244



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -2670,6 +2573,112 @@ object Log {
   private def isLogFile(file: File): Boolean =
     file.getPath.endsWith(LogFileSuffix)
 
+  // Rebuild producer state until lastOffset. This method may be called from the recovery code path, and thus must be
+  // free of all side-effects, i.e. it must not update any log-specific state.
+  private def rebuildProducerState(log: Log,

Review comment:
       This seems too large as a companion method. I am also not sure that we should pass along Log to this method since it exposes all internal states in Log, which make it harder to track usage.




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

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