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

gcjob: fix race in gc job test #46792

Merged
merged 1 commit into from
Mar 31, 2020
Merged

gcjob: fix race in gc job test #46792

merged 1 commit into from
Mar 31, 2020

Conversation

pbardea
Copy link
Contributor

@pbardea pbardea commented Mar 31, 2020

In the GC job test, the table descriptors were updated after creating
the job. Most of the time, the table descriptors were by the time the GC
job actually started running, but sometimes they would not be. This lead
to the GC job not noticing the dropped tables and therefore take too
long to complete (as it would wait another 5 minutes to check again).

This change ensures that the table descriptors are updated before the GC
job is created.

Fixes #46767.

Release justification: only touches testing code, and fixes a flake.
Release note: None

@pbardea pbardea requested a review from thoszhang March 31, 2020 16:28
@cockroach-teamcity
Copy link
Member

This change is Reviewable

In the GC job test, the table descriptors were updated after creating
the job. Most of the time, the table descriptors were by the time the GC
job actually started running, but sometimes they would not be. This lead
to the GC job not noticing the dropped tables and therefore take too
long to complete (as it would wait another 5 minutes to check again).

This change ensures that the table descriptors are updated before the GC
job is created.

Release justification: only touches testing code, and fixes a flake.
Release note: None
@pbardea
Copy link
Contributor Author

pbardea commented Mar 31, 2020

Stressed this branch locally and am at 3000 passes and no failures.

Copy link
Contributor

@thoszhang thoszhang left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@pbardea
Copy link
Contributor Author

pbardea commented Mar 31, 2020

TFTR!
bors r+

@craig
Copy link
Contributor

craig bot commented Mar 31, 2020

Build succeeded

@craig craig bot merged commit 10a05b5 into cockroachdb:master Mar 31, 2020
@pbardea pbardea deleted the flake branch April 27, 2020 00:51
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.

sql/gcjob_test: TestSchemaChangeGCJob failed
3 participants