szetszwo commented on PR #1340:
URL: https://github.com/apache/ratis/pull/1340#issuecomment-3861797749

   > ... aft follower updates its commitIndex only when handling AppendEntries 
from a valid leader. ...
   
   That's is a good point!  It seems no harm to update commitIndex for 
readIndex since
   - the follower has initiated the call to the leader so the leader must be 
valid (if not, the entire readIndex algorithm won't work), and
   - AppendEntries and heartbeat can be separated so updating commitIndex must 
already support concurrent update (agree that there was a bug RATIS-2234 
previously.  The other two bugs 
[RATIS-2235](https://issues.apache.org/jira/browse/RATIS-2235), 
[RATIS-2242](https://issues.apache.org/jira/browse/RATIS-2242) are related to 
AppendEntries but not updating commitIndex.)
   
   > ...  how about adding a CommitInfoProto list to ReadIndexReplyProto? ...
   
   Actually, we only have to add leader's commitIndex but not a CommitInfoProto 
list.
   
   @ivandika3 , I could see that adding leader's commitIndex to 
ReadIndexReplyProto needs more changes and makes the code complicated.  I am 
fine if we keep the current approach using triggerHeartbeat().  I respect your 
decision.


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