jolshan commented on a change in pull request #9590:
URL: https://github.com/apache/kafka/pull/9590#discussion_r610153469



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -760,6 +768,12 @@ class Log(@volatile private var _dir: File,
       // must fall within the range of existing segment(s). If we cannot find 
such a segment, it means the deletion
       // of that segment was successful. In such an event, we should simply 
rename the .swap to .log without having to
       // do a replace with an existing segment.
+      //
+      // For case 1 (log cleaning), we may have old segments before or after 
the swap segment that were cleaned.

Review comment:
       I think I'm a little confused too. My understanding of this line is that 
we can't have offsets in the swap segment that are outside the range of the 
segments in log we started from. Is there a case with this new behavior that 
I'm missing where this isn't the case? Or is it the "existing segments" part 
that is confusing.




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