jolshan commented on code in PR #16760:
URL: https://github.com/apache/kafka/pull/16760#discussion_r1699294030
##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -1238,7 +1238,14 @@ class Partition(val topicPartition: TopicPartition,
/**
* Try to complete any pending requests. This should be called without
holding the leaderIsrUpdateLock.
*/
- private def tryCompleteDelayedRequests(): Unit =
delayedOperations.checkAndCompleteAll()
+ def tryCompleteDelayedRequests(): Unit = {
Review Comment:
One thing I wasn't sure about:
In the ZK path, we call makeLeaders from
becomeLeaderOrFollower/LeaderAndIsrRequest handling. I believe if we encounter
an error then, we stop handling the request and the error is handled in
KafkaApis.
https://github.com/apache/kafka/blob/f1ef7a5a9f87cda7ae1209fc2285259eba4204ca/core/src/main/scala/kafka/server/KafkaApis.scala#L274.
BrokerMetadataPublisher's handling is
https://github.com/apache/kafka/blob/f1ef7a5a9f87cda7ae1209fc2285259eba4204ca/core/src/main/scala/kafka/server/metadata/BrokerMetadataPublisher.scala#L136
With this change, we will continue the makeLeader path in both cases.
Perhaps this is safe, but I want to make sure there isn't any gotchas there.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]