SzyWilliam commented on PR #832:
URL: https://github.com/apache/ratis/pull/832#issuecomment-1451186915

   @szetszwo Bravo! frequent appendEntries calls without changing nextIndex is 
bothering me for a while. Enforcing minimal wait time may help with this 
problem.
   > BTW, I should have mentioned that we did see very frequent appendEntries 
calls happening in some error conditions. The follower replied very fast 
without changing the nextIndex (Not sure why)
   
   In some of our scenarios, this problem happens when a new leader is elected 
and start sending AppendEntries to a slow follower. Unfortunately, this slow 
follower is going through a GC pause, so these AppendEntries just accumulates 
at gRPC buffer. When the slow follower comes around and starts dealing with 
these piled RPCs, it immediately finds the first AppendEntries nextIndex is 
inconsistent. So it replies INCONSISTENT to all of these accumulated AE RPCs, 
all with the same nextIndex.
   
   I was thinking before to add some initial states to prevent this issue, 
e.g., the new leader will only sends 1 AppendEntries to a follower until it 
receives a positive reply.


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