szetszwo commented on code in PR #1025:
URL: https://github.com/apache/ratis/pull/1025#discussion_r1462455727


##########
ratis-test/src/test/java/org/apache/ratis/RaftLogTruncateTests.java:
##########


Review Comment:
   BTW, the test will fail without the fix here:
   
   1. A client write a few `messagesToBeTruncated` requests to the old leader 
with three nodes (n3, n4, n5) down in a 5-node group.  These entries are 
written to the log but they cannot be committed since only two nodes (n1, n2) 
are available.
   2. Shut down n1, n2.
   3. Restart n3, n4, n5.  These nodes have a majority.  Then can elect a new 
leader and commit new entires.
   4. Restart n1, n2.  They should truncate their log and the 
`messagesToBeTruncated` entries will disappear.
   
   Bug:  since the client keeps retrying even after it has been closed, the 
client will retry the same requests to the new leader.   The 
`messagesToBeTruncated` entries will re-appear.



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