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: correctly filter out unknown schema change errors #89858

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Oct 12, 2022

When code was added to handle unknown schema errors inside the schemachanger workload, the
regex used had a flaw that did not correctly quote the errors allowing no retries to occur. This meant
we never address the original errors but just avoided them due to low probability.

This PR also cleans up some debug code accidentally added in an older PR.

@fqazi fqazi requested a review from a team October 12, 2022 20:39
@fqazi fqazi requested a review from a team as a code owner October 12, 2022 20:39
@fqazi fqazi requested review from renatolabs and removed request for a team October 12, 2022 20:39
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Fixes: cockroachdb#89859

In a previous PR some debug code was accidentally introduced
for unknown schema errors. These changes remove that
debug code.

Release note: None
@fqazi fqazi force-pushed the unknownSchemaRetry branch from ca888b6 to 43efc90 Compare October 12, 2022 20:46
@fqazi fqazi added branch-release-22.2 Used to mark GA and release blockers, technical advisories, and bugs for 22.2 backport-22.2.x and removed branch-release-22.2 Used to mark GA and release blockers, technical advisories, and bugs for 22.2 labels Oct 12, 2022
Copy link
Contributor

@chengxiong-ruan chengxiong-ruan left a comment

Choose a reason for hiding this comment

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

good find!

@@ -1116,7 +1116,7 @@ SELECT count(*) FROM %s
}

var (
regexpUnknownSchemaErr = regexp.MustCompile(`unknown schema \[\d+\]`)
regexpUnknownSchemaErr = regexp.MustCompile(`unknown schema "\[\d+]"`)
Copy link
Contributor

Choose a reason for hiding this comment

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

just want to confirm that we're trying to match something like unknown schema "[1]" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes the errors have the form: unknown schema "[1]". I'll add a comment to make it clear

Fixes: cockroachdb#89146

Previously, when we added logic to retry unknown schema errors,
the regex used was unfortunately out of sync with the actual
error generated. This patch fixes the regex to have the correct
string, since those errors were not properly retried.

Release note: None
@fqazi fqazi force-pushed the unknownSchemaRetry branch from 43efc90 to 900b38c Compare October 12, 2022 21:51
@fqazi
Copy link
Collaborator Author

fqazi commented Oct 13, 2022

@chengxiong-ruan TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Oct 13, 2022

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.

3 participants