Shilun Fan created RATIS-2760:
---------------------------------

             Summary: Fix flaky 
ReadOnlyRequestWithLongTimeoutTests.testLinearizableReadParallel
                 Key: RATIS-2760
                 URL: https://issues.apache.org/jira/browse/RATIS-2760
             Project: Ratis
          Issue Type: Bug
          Components: test
            Reporter: Shilun Fan
            Assignee: Shilun Fan


ReadOnlyRequestWithLongTimeoutTests.testLinearizableReadParallel intermittently 
fails with: expected: <2> but was: <1>
Example failure: 
https://github.com/apache/ratis/actions/runs/38951714056/job/117144457810?pr=1645

The test sends WAIT_AND_INCREMENT asynchronously, sleeps for 100 ms, and then 
issues stale and linearizable reads. It assumes that the write has been 
committed but has not yet been applied.
 
However, a fixed sleep does not guarantee this ordering. If the asynchronous 
write is delayed, the linearizable read may execute before the write is 
committed and legitimately return the previous value of 1, causing the 
assertion to fail.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to