Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel retry join #13606

Merged
merged 5 commits into from Jan 17, 2022
Merged

Parallel retry join #13606

merged 5 commits into from Jan 17, 2022

Conversation

ncabatoff
Copy link
Collaborator

@ncabatoff ncabatoff commented Jan 8, 2022

When using retry_join stanzas to setup new raft nodes via config (instead of issuing explicit join requests), each of the "leaders" specified are tried in turn until one if found that works, with a 2s delay between each attempt. It's common when using retry_join to use the same config that lists all nodes for every node's HCL, which means a new node could take quite a while to join if the actual leader in the cluster is listed last.

This PR changes how retry_join is handled so that we reach out to every node listed in parallel, and try to complete the join to the first node that replies without an error. We maintain the current behaviour of a 2s delay between each attempt, only now it's a 2s delay between retrying all nodes, instead of a 2s delay between each node attempt.

@vercel vercel bot temporarily deployed to Preview – vault-storybook January 10, 2022 14:01 Inactive
@vercel vercel bot temporarily deployed to Preview – vault January 10, 2022 14:01 Inactive
Copy link
Contributor

@pmmukh pmmukh left a comment

Choose a reason for hiding this comment

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

couple nits/questions, olgtm!

vault/raft.go Show resolved Hide resolved
vault/raft.go Outdated Show resolved Hide resolved
vault/raft.go Show resolved Hide resolved
vault/raft.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault January 14, 2022 17:30 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook January 14, 2022 17:30 Inactive
@ncabatoff ncabatoff merged commit 7e74beb into main Jan 17, 2022
@ncabatoff ncabatoff deleted the parallel-retry-join branch January 17, 2022 15:33
joatmon08 pushed a commit that referenced this pull request Jan 25, 2022
qk4l pushed a commit to qk4l/vault that referenced this pull request Feb 4, 2022
pmmukh added a commit that referenced this pull request Feb 28, 2022
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.

None yet

2 participants