Skip to content

upgrades: fix race condition in TestWaitForDelRangeInGCJob#100895

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
fqazi:upgradeTestFix
Apr 7, 2023
Merged

upgrades: fix race condition in TestWaitForDelRangeInGCJob#100895
craig[bot] merged 1 commit intocockroachdb:masterfrom
fqazi:upgradeTestFix

Conversation

@fqazi
Copy link
Copy Markdown
Collaborator

@fqazi fqazi commented Apr 6, 2023

Previously, this test relied on a migration to guarantee, a schema change GC job would complete before we checked the index/table keys (to validate clean up of data). This migration incorrectly waited for the GC job to fully complete, even if the job didn't start allowing this test to pass. After fixing this issue, this test suffers from a race condition since the job may not complete before the version finalizes now. To address this, this patch adds a SucceedsSoon, since the job should wake up and clean up shortly with DelRange enabled.

Fixes: #100853

Release note: None

Previously, this test relied on a migration to guarantee,
a schema change GC job would complete before we checked
the index/table keys (to validate clean up of data).
This migration incorrectly waited for the GC job to fully complete,
even if the job didn't start allowing this test to pass. After
fixing this issue, this test suffers from a race condition since
the job may not complete before the version finalizes now. To
address this, this patch adds a SucceedsSoon, since the job
should wake up and clean up shortly with DelRange enabled.

Fixes: cockroachdb#100853

Release note: None
@fqazi fqazi requested a review from a team April 6, 2023 23:54
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@fqazi fqazi added the backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only label Apr 6, 2023
Copy link
Copy Markdown
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

awesome, thanks for the quick fix!

@fqazi
Copy link
Copy Markdown
Collaborator Author

fqazi commented Apr 7, 2023

@rafiss TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 7, 2023

Build succeeded:

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Apr 7, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error setting reviewers, but backport branch blathers/backport-release-23.1-100895 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/100897/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. []

Backport to branch 23.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upgrade/upgrades: TestWaitForDelRangeInGCJob failed

3 participants