jsancio commented on code in PR #22620:
URL: https://github.com/apache/kafka/pull/22620#discussion_r3463511181
##########
raft/src/main/java/org/apache/kafka/raft/internals/UpdateVoterHandler.java:
##########
@@ -219,56 +347,107 @@ private Optional<VoterSet> updateVoters(
voters.updateVoterIgnoringDirectoryId(updatedVoter);
}
- private CompletionStage<UpdateRaftVoterResponseData> storeUpdatedVoters(
+ private void storeUpdatedVoters(
LeaderState<?> leaderState,
- ReplicaKey voterKey,
+ UpdateVoterHandlerState current,
Optional<KRaftVersionUpgrade.Voters> inMemoryVoters,
VoterSet newVoters,
- ListenerName requestListenerName,
long currentTimeMs
) {
+ var changeVoterState = leaderState.changeVoterState();
+
if (inMemoryVoters.isEmpty()) {
- // Since the partition support reconfig then just write the update
voter set directly to the log
- leaderState.appendVotersRecord(newVoters, currentTimeMs);
+ /* Since the partition support reconfig then just write the update
voter set directly to the log.
+ *
+ * Complete the RPC but don't reset the handler state. This allows
the followr to send a FETCH
Review Comment:
Done.
--
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]