ahuang98 commented on code in PR #18240:
URL: https://github.com/apache/kafka/pull/18240#discussion_r1899044657
##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -2442,10 +2503,10 @@ private void maybeTransition(
" and epoch " + epoch + " which is inconsistent with current
leader " +
quorum.leaderId() + " and epoch " + quorum.epoch());
} else if (epoch > quorum.epoch()) {
- if (leaderId.isPresent()) {
+ if (leaderId.isPresent() && !leaderEndpoints.isEmpty()) {
Review Comment:
I added this because I thought it was an oversight not to check for empty
endpoints given that we can initialize in UnattachedState when the
leaderendpoints are not known. But I see now that `maybeTransition` is only
called in places where the leaderendpoints are expected to be populated
--
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]