Skip to content

upgrades: fix race condition inside TestUpgradeSchemaChangerElements#97898

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
fqazi:TestUpgradeSchemaChangerElementsRace
Mar 2, 2023
Merged

upgrades: fix race condition inside TestUpgradeSchemaChangerElements#97898
craig[bot] merged 1 commit intocockroachdb:masterfrom
fqazi:TestUpgradeSchemaChangerElementsRace

Conversation

@fqazi
Copy link
Copy Markdown
Collaborator

@fqazi fqazi commented Mar 2, 2023

Previously, the test TestUpgradeSchemaChangerElements could fail intermittently due to improper atomic usage, where we didn't properly check and swap flag used to determine if we should check for a job. This could lead to a race condition where we read twice on a channel. To address this, this patch will ensure that this wait is properly only done once.

Fixes: #97439

Release note: None

Previously, the test TestUpgradeSchemaChangerElements could
fail intermittently due to improper atomic usage, where
we didn't properly check and swap flag used to determine
if we should check for a job. This could lead to a race condition
where we read twice on a channel. To address this, this patch
will ensure that this wait is properly only done once.

Fixes: cockroachdb#97439

Release note: None
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@fqazi fqazi force-pushed the TestUpgradeSchemaChangerElementsRace branch from 8006181 to 47353e4 Compare March 2, 2023 01:59
@fqazi fqazi marked this pull request as ready for review March 2, 2023 15:59
@fqazi fqazi requested a review from a team March 2, 2023 15:59
@fqazi
Copy link
Copy Markdown
Collaborator Author

fqazi commented Mar 2, 2023

@chengxiong-ruan TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 2, 2023

Build succeeded:

@craig craig bot merged commit d6de10f into cockroachdb:master Mar 2, 2023
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.

upgrade/upgrades: TestUpgradeSchemaChangerElements failed

3 participants