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

kvserver: deflake learner joint cfg relocate range #98536

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

kvoli
Copy link
Collaborator

@kvoli kvoli commented Mar 13, 2023

Previously, in TestLearnerOrJointConfigAdminRelocateRange it was possible for there to be an in-flight snapshot towards a learner, prior to sending AdminRelocateRange command. When this occurred, the test would fail as AdminRelocateRange returns an error when finding any in-flight snapshots to learners. This situation occurred infrequently, causing the test to flake.

This commit updates the TestLearnerOrJointConfigAdminRelocateRange test to first assert that there are the expected number of learners, then assert that there are no in-flight snapshots towards learners before beginning the main testing logic. The test is now unskipped.

dev test pkg/kv/kvserver \
      -f TestLearnerOrJointConfigAdminRelocateRange \
      -v --stress
...
5652 runs so far, 0 failures, over 12m30s

Resolves: #95500

Release note: None

@kvoli kvoli force-pushed the 230313.learnerjointconf branch from 3dc04f9 to d0ae2a6 Compare March 13, 2023 21:24
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@kvoli kvoli changed the title kvserver; deflake learner joint cfg relocate range kvserver: deflake learner joint cfg relocate range Mar 13, 2023
Previously, in `TestLearnerOrJointConfigAdminRelocateRange` it was
possible for there to be an in-flight snapshot towards a learner, prior
to sending `AdminRelocateRange` command. When this occurred, the test
would fail as `AdminRelocateRange` returns an error when finding any
in-flight snapshots to learners. This situation occurred infrequently,
causing the test to flake.

This commit updates the `TestLearnerOrJointConfigAdminRelocateRange`
test to first assert that there are the expected number of learners,
then assert that there are no in-flight snapshots towards learners
before beginning the main testing logic. The test is now unskipped.

```
dev test pkg/kv/kvserver \
      -f TestLearnerOrJointConfigAdminRelocateRange \
      -v --stress
...
5652 runs so far, 0 failures, over 12m30s
```

Resolves: cockroachdb#95500

Release note: None
@kvoli kvoli force-pushed the 230313.learnerjointconf branch from d0ae2a6 to 0a62474 Compare March 13, 2023 21:25
@kvoli kvoli self-assigned this Mar 13, 2023
@kvoli kvoli marked this pull request as ready for review March 13, 2023 22:08
@kvoli kvoli requested a review from a team as a code owner March 13, 2023 22:08
Copy link
Contributor

@andrewbaptist andrewbaptist left a comment

Choose a reason for hiding this comment

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

LGTM

@kvoli
Copy link
Collaborator Author

kvoli commented Mar 14, 2023

bors r=andrewbaptist

@craig craig bot merged commit a36d88b into cockroachdb:master Mar 14, 2023
@craig
Copy link
Contributor

craig bot commented Mar 14, 2023

Build succeeded:

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.

kv/kvserver: TestLearnerOrJointConfigAdminRelocateRange failed
3 participants