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



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -1021,6 +1036,13 @@ class Log(@volatile private var _dir: File,
           // re-initialize leader epoch cache so that 
LeaderEpochCheckpointFile.checkpoint can correctly reference
           // the checkpoint file in renamed log directory
           initializeLeaderEpochCache()
+          if (!partitionMetadataFile.isEmpty && 
!partitionMetadataFile.get.isEmpty()) {
+            val partitionMetadata = partitionMetadataFile.get.read()
+            initializePartitionMetadata()
+            partitionMetadataFile.get.write(partitionMetadata.topicId)

Review comment:
       Oh I did understand wrong. The file is already in place, so 
initializePartitionMetadata is all that is needed to get the correct file path.




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