You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Shilun Fan (Jira)" <ji...@apache.org> on 2026/05/05 07:58:00 UTC
[jira] [Created] (RATIS-2514) Fix flaky TestReadOnlyRequestWithGrpc.testReadAfterWrite
Shilun Fan created RATIS-2514:
---------------------------------
Summary: Fix flaky TestReadOnlyRequestWithGrpc.testReadAfterWrite
Key: RATIS-2514
URL: https://issues.apache.org/jira/browse/RATIS-2514
Project: Ratis
Issue Type: Sub-task
Components: gRPC
Reporter: Shilun Fan
Assignee: Shilun Fan
TestReadOnlyRequestWithGrpc.testReadAfterWrite may fail intermittently with:
{code:java}
AssertionFailedError: expected: <true> but was: <false> {code}
The failing assertion compares the result of an async read-after-write request with a concurrent linearizable read:
{code:java}
Assertions.assertTrue(retrieve(readAfterWrite.get()) >= retrieve(linearizable.get())); {code}
This assumption is unreliable. The test sends multiple async writes without waiting for them to complete, then issues a linearizable read and a read-after-write request concurrently. These two reads may observe different linearization points and different subsets of concurrent writes, so read-after-write is not guaranteed to return a value greater than or equal to the concurrent linearizable read.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)