-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
release-23.1: server,upgrades: bootstrap at binaryMinVersion and run upgrades to BinaryVersionOverride #99587
Merged
Conversation
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
…naryVersionOverride Previously, tests that set BinaryVersionOverride would bootstrap their test clusters at this overridden value. As part of this bootstrap we would initialize the cluster with data as it appears on `binaryVersion` i.e. system tables would be created using the schemas defined on the current `binaryVersion`. Most tests that set BinaryVersionOverride would then manually call into `upgrade.Upgrade` to move the cluster version forward. Since we have already bootstrapped the initial data at `binaryVersion` these upgrades would not *really* run. We would just be testing their idempotency unless the test did some gymnastics to "undo" the bootstrap and then test the actual migration. So effectively, the `BinaryVersionOverride` made the server think it was running that version but none of the associated upgrade logic to reach that version was exercised. In 23.1 we baked in the initial data that is bootstrapped on `binaryMinSupportedVersion`. This development allows us to bootstrap the test cluster to `binaryMinSupportedVersion` and *actually* step through the upgrades until `BinaryVersionOverride` before running the test. The new behaviour of setting this override is described below: This value, when set, influences test cluster/server creation in two different ways: Case 1: ------ If the test has not overridden the `cluster.Settings.Version.BinaryMinSupportedVersion`, then the cluster will be bootstrapped at `binaryMinSupportedVersion` (if this server is the one bootstrapping the cluster). After all the servers in the test cluster have been started, `SET CLUSTER SETTING version = BinaryVersionOverride` will be run to step through the upgrades until the specified override. Case 2: ------ If the test has overridden the `cluster.Settings.Version.BinaryMinSupportedVersion` then it is not safe for us to bootstrap at `binaryMinSupportedVersion` as it might be less than the overridden minimum supported version. Furthermore, we do not have the initial cluster data (system tables etc.) to bootstrap at the overridden minimum supported version. In this case we bootstrap at `BinaryVersionOverride` and populate the cluster with initial data corresponding to the `binaryVersion`. In other words no upgrades are *really* run and the server only thinks that it is running at `BinaryVersionOverride`. Tests that fall in this category should be audited for correctness. The version that we bootstrap at is also used when advertising this server's binary version when sending out join requests. Informs: #97762 Release note: None
blathers-crl
bot
force-pushed
the
blathers/backport-release-23.1-99082
branch
from
March 26, 2023 00:54
b995ddf
to
feee281
Compare
blathers-crl
bot
requested review from
herkolategan and
renatolabs
and removed request for
a team
March 26, 2023 00:54
blathers-crl
bot
force-pushed
the
blathers/backport-release-23.1-99082
branch
from
March 26, 2023 00:54
5d4586c
to
95406c1
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
dt
approved these changes
Mar 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #99082 on behalf of @adityamaru.
/cc @cockroachdb/release
Previously, tests that set BinaryVersionOverride would bootstrap
their test clusters at this overridden value. As part of this bootstrap
we would initialize the cluster with data as it appears on
binaryVersion
i.e. system tables would be created using the schemas defined on the current
binaryVersion
.Most tests that set BinaryVersionOverride would then manually call into
upgrade.Upgrade
to move the cluster version forward. Since we have already bootstrapped the initial
data at
binaryVersion
these upgrades would not really run. We would just be testingtheir idempotency unless the test did some gymnastics to "undo" the bootstrap and
then test the actual migration. So effectively, the
BinaryVersionOverride
madethe server think it was running that version but none of the associated upgrade
logic to reach that version was exercised.
In 23.1 we baked in the initial data that is bootstrapped on
binaryMinSupportedVersion
.This development allows us to bootstrap the test cluster to
binaryMinSupportedVersion
and actually step through the upgrades until
BinaryVersionOverride
before running thetest.
The new behaviour of setting this override is described below:
This value, when set, influences test cluster/server creation in two
different ways:
Informs: #97762
Fixes: #99651
Release note: None
Release justification: low risk, test only change that increases the coverage of upgrade tests