kevin-wu24 commented on code in PR #22111:
URL: https://github.com/apache/kafka/pull/22111#discussion_r3424122720
##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -1725,6 +1725,13 @@ private boolean handleFetchResponse(
leaderEndpoints = Endpoints.empty();
}
+ maybeSwitchObserverFetchToLeader(
+ responseEpoch,
+ responseLeaderId,
+ leaderEndpoints,
+ currentTimeMs
+ );
Review Comment:
I am checking:
```
else if (responseEpoch == quorum.epoch() && quorum.isUnattached() &&
responseLeaderId.isPresent() && !leaderEndpoints.isEmpty()) {
```
in this method. This handler and logic only applies to nodes in the
`Unattached` state, which can only fetch from the bootstrap servers. The node
at this point in time is `Unattached` and can only send `Fetch`.
--
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]