-
Notifications
You must be signed in to change notification settings - Fork 593
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
raft: don't promote to voter if previous config is not committed #17675
Conversation
/ci-repeat |
consistency_level>> | ||
consistency_level, | ||
isolated_t>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love seeing unit tests!
Build seems to be failing here, @ztlpn |
44f1272
to
195feac
Compare
195feac
to
4e7a69a
Compare
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/47564#018ec35c-4118-46c6-b0bd-e5ebdb0177ca ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/47564#018ec363-6bdd-4bf8-829f-e0ac88543d61 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/47600#018ec749-0f07-41dc-afcd-eee752811673 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/47637#018eca7c-1e2d-4a4c-b647-0fbe5ef9bc7a |
4e7a69a
to
86c526f
Compare
Otherwise we may add several new voters in quick succession, that the old voters will not know of, resulting in a possibility of non-intersecting quorums. Example scenario: 1. we start with leader id 1, committed configuration: voters:1,2,3; learners:4,5 2. 1,4,5 are partitioned from 2,3 3. 1 finishes recovery of 4 and 5 and adds them as voters 4. now 1 can remain the leader getting responses from 1,4,5 (that form a quorum in the new voter set 1,2,3,4,5) and 2,3 can elect a leader among themselves, say 2 (because 2,3 is a quorum in the old voter set 1,2,3) 5. now 1 and 2 both think that they are legitimate leaders and can commit new entries, resulting in divergent logs. To prevent this, in step 3 we don't add 5 as voter until the configuration with voter 4 is committed (or vice versa).
If we test reconfig with faulty network, nodes leaving the raft group are not guaranteed to be up to date because they might have left the group before they have been fully recovered. So we restrict the after-reconfig checks to target nodes.
86c526f
to
cea0c6c
Compare
/backport v23.3.x |
/backport v23.2.x |
Failed to create a backport PR to v23.2.x branch. I tried:
|
Failed to create a backport PR to v23.3.x branch. I tried:
|
Otherwise we may add several new voters in quick succession, that the old voters will not know of, resulting in a possibility of non-intersecting quorums.
Example scenario:
To prevent this, in step 3 we don't add 5 as voter until the configuration with voter 4 is committed (or vice versa).
Backports Required
Release Notes
Bug Fixes