hachikuji commented on a change in pull request #11186:
URL: https://github.com/apache/kafka/pull/11186#discussion_r700620002



##########
File path: 
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
##########
@@ -804,7 +817,7 @@ void handleBrokerUnfenced(int brokerId, long brokerEpoch, 
List<ApiMessageAndVers
                 TopicControlInfo topic = topics.get(topicEntry.getValue());
                 if (topic != null) {
                     for (int partitionId : topic.parts.keySet()) {
-                        ApiError error = electLeader(topicName, partitionId, 
uncleanOk, records);
+                        ApiError error = electLeader(topicName, partitionId, 
electionType, records);

Review comment:
       Good point. I've updated the code to handle this case. It is covered in 
the unit tests, so perhaps that is good enough? It would be difficult to test 
through `LeaderElectionCommandTest`, so we would need an 
`ElectLeadersRequestTest` if we want an integration test.




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


Reply via email to