-
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
sql: ensure type schema change cleanup job is resilient to retries #60495
Conversation
@otan I think the testing knob belongs in this commit, as I think we may wanna backport this thing to 20.2. |
"descriptor %d not found for type change job; assuming it was dropped, and exiting", | ||
tc.typeID, | ||
) | ||
case !isPermanentSchemaChangeError(rollbackErr): |
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.
i'm not sure i trust this function enough to not leave dangling references but i have not enough experience with it ;)
LGTM is LGT-schema!
Previously if the type schema changer ran into a non-permanent error, it wouldn't retry transparently. Instead, manual cleanup would be required. This patch fixes this behavior. This patch also adds a testing knob, `RunAfterOnFailOrCancel` to test the afformentioned bug. Fixes cockroachdb#60489 Release note (bug fix): Previosly, retryable errors in the cleanup phase of the type schema changer wouldn't be retried automatically in the background. This is now fixed.
b6b6170
to
755fa25
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.
Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @arulajmani)
bors r=lucy-zhang,otan |
Build succeeded: |
Previously if the type schema changer ran into a non-permanent error,
it wouldn't retry transparently. Instead, manual cleanup would be
required. This patch fixes this behavior.
This patch also adds a testing knob,
RunAfterOnFailOrCancel
to testthe afformentioned bug.
Fixes #60489
Release note (bug fix): Previosly, retryable errors in the cleanup
phase of the type schema changer wouldn't be retried automatically
in the background. This is now fixed.