junrao commented on a change in pull request #8479: URL: https://github.com/apache/kafka/pull/8479#discussion_r445904547
########## File path: core/src/main/scala/kafka/cluster/Partition.scala ########## @@ -499,7 +500,16 @@ class Partition(val topicPartition: TopicPartition, addingReplicas = addingReplicas, removingReplicas = removingReplicas ) - createLogIfNotExists(partitionState.isNew, isFutureReplica = false, highWatermarkCheckpoints) + try { + this.createLogIfNotExists(partitionState.isNew, isFutureReplica = false, highWatermarkCheckpoints) + } catch { + case e: ZooKeeperClientException => + stateChangeLogger.info(s"Because a ZooKeeper client exception has occurred, completed become leader " + + s"state change from epoch $leaderEpoch only for those updated partitions with before " + Review comment: The message seem inaccurate since we only skip this partition now. Ditto in makeFollower(). ########## File path: core/src/main/scala/kafka/cluster/Partition.scala ########## @@ -499,7 +500,16 @@ class Partition(val topicPartition: TopicPartition, addingReplicas = addingReplicas, removingReplicas = removingReplicas ) - createLogIfNotExists(partitionState.isNew, isFutureReplica = false, highWatermarkCheckpoints) + try { + this.createLogIfNotExists(partitionState.isNew, isFutureReplica = false, highWatermarkCheckpoints) + } catch { + case e: ZooKeeperClientException => + stateChangeLogger.info(s"Because a ZooKeeper client exception has occurred, completed become leader " + + s"state change from epoch $leaderEpoch only for those updated partitions with before " + + s"ZooKeeper disconnect occurred.", e) + error(s"ZooKeeper client occurred while rendering a $topicPartition's leader through zkClient.'", e) Review comment: Do we need ' before "? Also, the text could probably be sth like "ZooKeeper client error occurred while becoming leader for $topicPartition." Ditto in makeFollower(). ---------------------------------------------------------------- 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