showuon commented on code in PR #12136: URL: https://github.com/apache/kafka/pull/12136#discussion_r876740554
########## core/src/main/scala/kafka/server/KafkaServer.scala: ########## @@ -830,7 +830,13 @@ class KafkaServer( private def checkpointBrokerMetadata(brokerMetadata: ZkMetaProperties) = { for (logDir <- config.logDirs if logManager.isLogDirOnline(new File(logDir).getAbsolutePath)) { val checkpoint = brokerMetadataCheckpoints(logDir) - checkpoint.write(brokerMetadata.toProperties) + try { + checkpoint.write(brokerMetadata.toProperties) + } catch { + case e: IOException => + val dirPath = checkpoint.file.getAbsolutePath + logDirFailureChannel.maybeAddOfflineLogDir(dirPath, s"Error while writing meta.properties to $dirPath", e) Review Comment: handle IOException during writing meta.properties when broker startup, to avoid it gracefully shutdown the broker. -- 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