ccding commented on a change in pull request #11345: URL: https://github.com/apache/kafka/pull/11345#discussion_r781624729
########## File path: core/src/main/scala/kafka/log/LogLoader.scala ########## @@ -333,8 +333,9 @@ object LogLoader extends Logging { try segment.sanityCheck(timeIndexFileNewlyCreated) catch { case _: NoSuchFileException => - error(s"${params.logIdentifier}Could not find offset index file corresponding to log file" + - s" ${segment.log.file.getAbsolutePath}, recovering segment and rebuilding index files...") + if (segment.baseOffset < params.recoveryPointCheckpoint) Review comment: I think if hadCleanShutdown is true, it should never throw NoSuchFileException unless there is a bug in the code. Added the hadCleanShutdown check anyways to catch potential issues: `if (params.hadCleanShutdown || segment.baseOffset < params.recoveryPointCheckpoint)` -- 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