You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2026/10/01 16:58:00 UTC

[jira] [Updated] (RATIS-2723) LogAppender purge tests may fail after a leader change

     [ https://issues.apache.org/jira/browse/RATIS-2723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz-wo Sze updated RATIS-2723:
------------------------------
    Component/s: test

> LogAppender purge tests may fail after a leader change
> ------------------------------------------------------
>
>                 Key: RATIS-2723
>                 URL: https://issues.apache.org/jira/browse/RATIS-2723
>             Project: Ratis
>          Issue Type: Bug
>          Components: test
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{setupPurgedLeaderLog()}} purges the log on the current leader, but the verification helper calls {{waitForLeader()}} again. If leadership changes, the test may verify a different server whose log has not been purged.
> This can cause the following assertion failure:
> {code:java}
> Entry at previousIndex=58 should have been purged
> ==> expected: <null> but was: <(t:3, i:58)> {code}
> In the failing CI run, setup purged the log on {{{}s2{}}}, while verification used the new leader {{{}s0{}}}.
> The tests should use the same leader for setup and verification and handle leadership changes explicitly.



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