Skip to content

RATIS-2682. Use the original Raft group for client retries in testKillLeaderDuringReconf - #1578

Merged
szetszwo merged 1 commit into
apache:masterfrom
slfan1989:RATIS-2682
Sep 3, 2026
Merged

RATIS-2682. Use the original Raft group for client retries in testKillLeaderDuringReconf#1578
szetszwo merged 1 commit into
apache:masterfrom
slfan1989:RATIS-2682

Conversation

@slfan1989

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This pull request fixes a remaining race in testKillLeaderDuringReconf.

The test previously created the Raft client after calling addNewPeers() and removePeers(). These methods update cluster.group to the target configuration, which may contain the unstarted peer and exclude an original
voting member that can become the new leader after the original leader is killed.

With SimulatedRpc, a request sent to the unstarted peer may wait for 3 seconds before timing out.
Repeated retries against that peer can exhaust the test's waiting period before the setConfiguration request reaches the new leader.

The test then fails with an error such as:

New leader s2 is not bootstrapping peer s3

What is the link to the Apache JIRA

RATIS-2682. Use the original Raft group for client retries in testKillLeaderDuringReconf

How was this patch tested?

The target test passed 100 runs using 10 parallel splits with 10 iterations per split:

https://github.com/slfan1989/ratis/actions/runs/33755713261

@szetszwo szetszwo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 the change looks good.

@szetszwo
szetszwo merged commit b31153b into apache:master Sep 3, 2026
16 checks passed
@slfan1989

Copy link
Copy Markdown
Contributor Author

@szetszwo Thanks for the review and for merging the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants