-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The migrations infrastructure makes use of internal fence versions when stepping through consecutive versions. We'll need to first bump the fence version for each intermediate cluster version, before bumping the "real" one. Doing so allows us to provide the invariant that whenever a cluster version is active, all nodes in the cluster (including ones added concurrently during version upgrades) are running binaries that know about the version. It's instructive to walk through how we expect a version migration from v21.1 to v21.2 to take place, and how we behave in the presence of new v21.1 or v21.2 nodes being added to the cluster. - All nodes are running v21.1 - All nodes are rolled into v21.2 binaries, but with active cluster version still as v21.1 - The first version bump will be into v21.2(fence=1), see the migration manager above for where that happens Then concurrently: - A new node is added to the cluster, but running binary v21.1 - We try bumping the cluster gates to v21.2(fence=1) If the v21.1 nodes manages to sneak in before the version bump, it's fine as the version bump is a no-op one (all fence versions are). Any subsequent bumps (including the "actual" one bumping to v21.2) will fail during the validation step where we'll first check to see that all nodes are running v21.2 binaries. If the v21.1 node is only added after v21.2(fence=1) is active, it won't be able to actually join the cluster (it'll be prevented by the join RPC). --- We rely on the invariant we introduced earlier that requires new user-defined versions (users being crdb engineers) to always have even-numbered Internal versions. This reserved the odd numbers to slot in fence versions for each user-defined one. Release note: None
- Loading branch information
1 parent
8e8ccb1
commit 6787eec
Showing
11 changed files
with
244 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.