junrao commented on a change in pull request #9718: URL: https://github.com/apache/kafka/pull/9718#discussion_r540588994
########## 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: We can probably keep the two other two simpler methods (without Log as the input) as the companion methods. ---------------------------------------------------------------- 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: us...@infra.apache.org