mimaison commented on code in PR #23168:
URL: https://github.com/apache/kafka/pull/23168#discussion_r3805800928
##########
raft/src/main/java/org/apache/kafka/raft/FollowerState.java:
##########
@@ -232,17 +244,18 @@ public void
setFetchingSnapshot(Optional<RawSnapshotWriter> newSnapshot) {
@Override
public boolean canGrantVote(ReplicaKey replicaKey, boolean isLogUpToDate,
boolean isPreVote) {
- if (isPreVote && !hasFetchedFromLeader && isLogUpToDate) {
+ if (isPreVote && (!hasFetchedFromLeader || hasLeaderResigned) &&
isLogUpToDate) {
Review Comment:
Should we have a test for that change in `FollowerStateTest`?
--
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]