[
https://issues.apache.org/jira/browse/RATIS-2723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved RATIS-2723.
-------------------------------
Fix Version/s: 3.4.0
Resolution: Fixed
The pull request is now merged. Thanks, [~slfan1989]!
> 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
> Fix For: 3.4.0
>
> 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)