-
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
tabledesc_test: deflake TestIndexDoesNotStorePrimaryKeyColumnMixedVersion #116791
Merged
craig
merged 1 commit into
cockroachdb:master
from
Xiang-Gu:deflake/TestIndexDoesNotStorePrimaryKeyColumnMixedVersion
Dec 20, 2023
Merged
tabledesc_test: deflake TestIndexDoesNotStorePrimaryKeyColumnMixedVersion #116791
craig
merged 1 commit into
cockroachdb:master
from
Xiang-Gu:deflake/TestIndexDoesNotStorePrimaryKeyColumnMixedVersion
Dec 20, 2023
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
rafiss
requested changes
Dec 19, 2023
Xiang-Gu
force-pushed
the
deflake/TestIndexDoesNotStorePrimaryKeyColumnMixedVersion
branch
from
December 19, 2023 22:10
499641c
to
6db9546
Compare
rafiss
requested changes
Dec 19, 2023
@@ -115,6 +114,8 @@ func TestIndexDoesNotStorePrimaryKeyColumnMixedVersion(t *testing.T) { | |||
|
|||
// Assert cluster version upgrade is blocked. | |||
require.Equal(t, [][]string{{"1000023.1"}}, tdb.QueryStr(t, "SHOW CLUSTER SETTING version;")) | |||
// disable AOST for upgrade precondition check to ensure it sees the injected, corrupt descriptor. | |||
upgrades.TestingSetFirstUpgradePreconditionAOST(false) |
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.
this should be:
defer upgrades.TestingSetFirstUpgradePreconditionAOST(false)()
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.
good catch! Fixed
…sion Previously, this test would flake under `--stress` and the root cause is because the upgrade precondition check that it relies on actually checks for corrupt descriptor at AOST '-10s', and it's possible that the corrupt descriptor was injected within the last 10s to the system, and thus the check produced a "false negative" (meaning it saw there isn't no corruption at AOST '-10s' and mistakenly assumed there isn't corruption now) and thus mistakenly allowed the cluster upgrade to proceed. The AOST '-10s' trick in the upgrade was implemented to help with performance, and, for now, I think that outweighs the possibility of producing such false-negatives, so this fix instead modified the test such that it waits 10s after injecting the corrupt descriptor to ensure it will be seen by the time the upgrade logic runs. The downside that comes with this decision is this test will now take ~10-11s to run and we need to skip it under `--stress` (bc 1000 iterations / # of parallelism * 10s can still be larger than 1h, the default timeout for nightly stresses). Release note: None
Xiang-Gu
force-pushed
the
deflake/TestIndexDoesNotStorePrimaryKeyColumnMixedVersion
branch
from
December 19, 2023 23:30
6db9546
to
de78ad1
Compare
rafiss
approved these changes
Dec 20, 2023
bors r+ |
Build succeeded: |
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.
Previously, this test would flake under
--stress
and the root cause is because the upgrade precondition check that it relies on actually checks for corrupt descriptor at AOST '-10s', and it's possible that the corrupt descriptor was injected within the last 10s to the system, and thus the check produced a "false negative" (meaning it saw there isn't no corruption at AOST '-10s' and mistakenly assumed there isn't corruption now) and thus mistakenly allowed the cluster upgrade to proceed.Fixes #116622
Release note: None