Johnny-Malizia commented on a change in pull request #8936:
URL: https://github.com/apache/kafka/pull/8936#discussion_r464793424



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -652,6 +653,12 @@ class Log(@volatile private var _dir: File,
     bytesTruncated
   }
 
+  def segmentRecovery(): LogSegment => Int = {
+    (segment: LogSegment) => {
+      recoverSegment(segment, None)

Review comment:
       This behavior doesn't seem intuitive to me, as it is expected that 
indexes are trimmed when written to disk, so if they're loaded untrimmed it is 
unlikely the next write to disk will fix this issue leaving the broker in a 
crash loop. This is definitely better than deleting data prematurely, but still 
doesn't seem great.




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


Reply via email to