pprovenzano commented on code in PR #14578:
URL: https://github.com/apache/kafka/pull/14578#discussion_r1369329881


##########
core/src/main/scala/kafka/server/KafkaServer.scala:
##########
@@ -1025,9 +1026,13 @@ class KafkaServer(
    */
   private def checkpointBrokerMetadata(brokerMetadata: ZkMetaProperties) = {
     for (logDir <- config.logDirs if logManager.isLogDirOnline(new 
File(logDir).getAbsolutePath)) {
+      val props = brokerMetadata.toProperties.clone().asInstanceOf[Properties]
+      // If the Uuid is not set then we set it here because originally we 
ignored
+      // directories with no meta.properties file and we are creating it here.
+      props.setProperty("directory.id", 
logManager.directoryId(logDir).getOrElse(Uuid.randomUuid()).toString)

Review Comment:
   Okay, I fixed LogManager to generate the directory ID for all cases where it 
is missing. This includes if the meta.properties is missing which can only 
occur if we are in ZK mde. It does not create the missing meta.properties file 
until after the broker is registered with ZK.



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to