cmccabe commented on code in PR #13372: URL: https://github.com/apache/kafka/pull/13372#discussion_r1134590727
########## core/src/main/scala/kafka/zk/ZkMigrationClient.scala: ########## @@ -211,19 +230,21 @@ class ZkMigrationClient(zkClient: KafkaZkClient) extends MigrationClient with Lo } } - override def readAllMetadata(batchConsumer: Consumer[util.List[ApiMessageAndVersion]], - brokerIdConsumer: Consumer[Integer]): Unit = { + override def readAllMetadata( + batchConsumer: Consumer[util.List[ApiMessageAndVersion]], + brokerIdConsumer: Consumer[Integer] + ): Unit = wrapZkException { Review Comment: I think it would be better to have the `wrapZkException` blocks inside `migrateTopics`, `migrateBrokerConfigs`, `migrateClientQuotas`, `migrateProducerId`. Then we can have a simple mental rule like: if you do something with zkClient, you need to wrap it. And not have to analyze control flow. -- 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