jsancio commented on code in PR #22620:
URL: https://github.com/apache/kafka/pull/22620#discussion_r3785651802


##########
raft/src/main/java/org/apache/kafka/raft/internals/UpdateVoterHandler.java:
##########
@@ -155,50 +192,218 @@ public CompletionStage<UpdateRaftVoterResponseData> 
handleUpdateVoterRequest(
             );
         }
 
-        // Check that endpoints includes the default listener
-        if (voterEndpoints.address(defaultListenerName).isEmpty()) {
+        // Send API_VERSIONS request to new voter to test new default endpoint

Review Comment:
   This is an interesting bug and I agree with it. I am not sure I agree with 
the remedy. The work around is to either reconfigure the voter so that the 
leader can reach it or shutdown the voter to then remove it.
   
   UpdateVoter is sent every `controller.quorum.fetch.timeout.ms` if the 
endpoints are different. ApiVersions waits for 
`controller.quorum.request.timeout.ms`. In the default configuration they are 
both set to 2 seconds. I think the lowest LOE is to simply adjust the frequency 
of UpdateVoter to `2 x controller.quorum.fetch.timeout.ms`. I originally set 
the frequency to the fetch timeout to not starve Fetch requests. I think it is 
fine to change the default request to 4 seconds. It is fine to delaying 
endpoint update by 4 seconds at startup. What do you think?



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

Reply via email to