ivandika3 commented on PR #1362:
URL: https://github.com/apache/ratis/pull/1362#issuecomment-4045125873

   @szetszwo I have updated the patch to send `repliedIndex` as part of the 
`commitIndex` and also reverted the using `appliedIndex` as the `repliedIndex`.
   
   However, the `runTestFollowerReadOnlyParallel` test failed again. I'm still 
not sure why there was a `Thread.sleep(100)` in the test. From 
https://github.com/apache/ratis/pull/735/changes it seems that it is used to 
ensure that the write is committed by the leader, but not yet applied yet 
(since `WAIT_AND_INCREMENT` takes 500ms)? Since we don't check whether 
`WAIT_AND_INCREMENT` has been applied and replied to the client, we cannot 
ascertain that the write has completed. Therefore, the subsequent call get can 
see the incremented or non incremented value. If we remove the 
`Thread.sleep(100)`, even the readIndex using `commitIndex` will fail. So this 
test does not seem to be correct.


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