showuon commented on a change in pull request #9178:
URL: https://github.com/apache/kafka/pull/9178#discussion_r486747592



##########
File path: core/src/main/scala/kafka/log/LogCleanerManager.scala
##########
@@ -390,9 +396,9 @@ private[log] class LogCleanerManager(val logDirs: Seq[File],
         checkpoints.get(sourceLogDir).flatMap(_.read().get(topicPartition)) 
match {
           case Some(offset) =>
             debug(s"Removing the partition offset data in checkpoint file for 
'${topicPartition}' " +
-              s"from ${sourceLogDir.getAbsoluteFile} direcotory.")
+              s"from ${sourceLogDir.getAbsoluteFile} directory.")
             // Remove this partition data from the checkpoint file in the 
source log directory
-            updateCheckpoints(sourceLogDir, None, topicPartitionToBeRemoved = 
topicPartition)
+            updateCheckpoints(sourceLogDir, None, topicPartitionToBeRemoved = 
Some(topicPartition))

Review comment:
       Good suggestion. I make the default value of 2nd parameter 
`partitionToUpdateOrAdd` to be `None`, so here, I can just call with 2 params: 
`updateCheckpoints(sourceLogDir, topicPartitionToBeRemoved = 
Some(topicPartition))`, and other places as well. Thanks.




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