kevin-wu24 commented on PR #20354:
URL: https://github.com/apache/kafka/pull/20354#issuecomment-3188995625

   Hi @chia7712, @jsancio and I had a discussion offline about some of the 
"backoff" logic in `pollFollowerAsObserver` and `pollFollowerAsVoter`. It is 
partially related to the bug here, but mainly the problem is that the 
calculation of the return value for these methods is conceptually incorrect as 
it is now. Basically, the fetch timeout and update voter set timeout mean two 
different things conceptually, but the code treats them similarly.
   
   - When the fetch timeout expires, it means the voter should transition 
states. This means the fetch timeout is something we should consider when 
calculating the backoff.
   - The update voter set timeout just means that every X amount of time, the 
replica should try to send an Add/Remove/UpdateVoterRPC. The value of this 
timer is not something we should consider when calculating the backoff. If we 
successfully send one of these RPCs, we should wait for 
`sendResult.timeToWaitMs()`. If we don't successfully send one of these RPCs 
because there is a pending request, we should also wait for 
`sendResult.timeToWaitMs()`.


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to