andrewchoi5 commented on a change in pull request #8479:
URL: https://github.com/apache/kafka/pull/8479#discussion_r445953130



##########
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:
       👍 , have made that change. Thanks @junrao 




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