-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Conversation
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
ca888b6
to
43efc90
Compare
There was a problem hiding this 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+]"`) |
There was a problem hiding this comment.
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]"
?
There was a problem hiding this comment.
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
43efc90
to
900b38c
Compare
@chengxiong-ruan TFTR! bors r+ |
Build succeeded: |
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.