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



##########
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:
       Right. Ok, I see what you are saying now. I can clarify these points. 
   As for the deletion. I think the idea is that the segments that will be 
replaced (that "compose" the swap segment) are marked for deletion after the 
swap segment is created. I think the idea is that if a segment containing an 
offset in the range of the swap segment's offsets is missing, that means that 
the deletion completed. Again, I can clarify this. 




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