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

workload/schemachanger: allow unknown schema errors in certain contexts #82941

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Jun 15, 2022

Previously, the schema changer workload could hit intermittent
errors when descriptors were bound after being looked up using
crdb_internal table. Unfortunately, the crdb_internal tables never
lease out descriptors, so these schema could be pulled from under us.
To address this, this patch will allow unknown schema errors for
certain crdb_internal queries that are likely to observe this
condition.

Addressing issue #64673 would improve some of this behaviour,
and eliminate the need for the workaround here, since we would
automatically get a retry error.

Release note: None

@fqazi fqazi requested a review from a team June 15, 2022 15:40
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

I wish that once we read descriptors for the virtual tables we used those for all purposes in the transaction and if we read them after leasing a descriptor, we sent a retry error if there was a version mismatch. That's #64673 -- can you reference that issue here?

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@fqazi fqazi marked this pull request as ready for review June 15, 2022 18:01
Copy link
Collaborator Author

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

@ajwerner TFTR

I'll add this here

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

Previously, the schema changer workload could hit intermittent
errors when descriptors were bound after being looked up using
crdb_internal table. Unfortunately, the crdb_internal tables never
lease out descriptors, so these schema could be pulled from under us.
To address this, this patch will allow unknown schema errors for
certain crdb_internal queries that are likely to observe this
condition.

Addressing issue cockroachdb#64673 would improve some of this behavior,
and eliminate the need for the workaround here, since we would
automatically get a retry error.

Release note: None
@fqazi
Copy link
Collaborator Author

fqazi commented Jun 15, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 15, 2022

Build succeeded:

@craig craig bot merged commit dd01587 into cockroachdb:master Jun 15, 2022
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.

3 participants