dajac commented on a change in pull request #8672:
URL: https://github.com/apache/kafka/pull/8672#discussion_r436523916



##########
File path: core/src/main/scala/kafka/log/LogManager.scala
##########
@@ -878,8 +936,7 @@ class LogManager(logDirs: Seq[File],
         // Now that replica in source log directory has been successfully 
renamed for deletion.
         // Close the log, update checkpoint files, and enqueue this log to be 
deleted.
         sourceLog.close()
-        checkpointRecoveryOffsetsAndCleanSnapshot(sourceLog.parentDirFile, 
ArrayBuffer.empty)
-        checkpointLogStartOffsetsInDir(sourceLog.parentDirFile)
+        checkpointRecoveryAndLogStartOffsetsInDir(sourceLog.parentDirFile)

Review comment:
       Actually, we were not cleaning snapshots here. 
`checkpointRecoveryOffsetsAndCleanSnapshot` was cleaning the snapshots of the 
logs passed in the second argument. `ArrayBuffer.empty` in our particular case.
   
   Indeed, I thought that there is little sense to couple checkpointing and 
cleaning the snapshots given that they operate on separate arguments. We were 
checkpointing based on the first argument and cleaning based on the second one. 
It is more misleading than anything else.




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