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

release-20.1: sql: fix handling of errors in reversing schema change mutations #47575

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

thoszhang
Copy link
Contributor

Backport 1/1 commits from #47553.

/cc @cockroachdb/release


As part of fixing error handling for rolling back schema changes in
general, a bug was introduced: When an error was returned from reversing
the direction of mutations, instead of returning that error, we would
instead return the original resumer error. This would prevent some
retriable errors from producing retries, and could lead to failed jobs
that weren't cleaned up even though they could have been; fixing these
problems was the point of the original PR. This patch replaces the wrong
error with the right error.

A new schema change testing knob has been added to inject errors for
testing.

See #47446 for the original error handling fix.
Closes #47532.

Release note (bug fix): Fixed a bug causing some schema change rollbacks
to fail permanently even on transient errors.

As part of fixing error handling for rolling back schema changes in
general, a bug was introduced: When an error was returned from reversing
the direction of mutations, instead of returning that error, we would
instead return the original resumer error. This would prevent some
retriable errors from producing retries, and could lead to failed jobs
that weren't cleaned up even though they could have been; fixing these
problems was the point of the original PR. This patch replaces the wrong
error with the right error.

A new schema change testing knob has been added to inject errors for
testing.

Release note (bug fix): Fixed a bug causing some schema change rollbacks
to fail permanently even on transient errors.
@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.

:lgtm:

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

@jordanlewis jordanlewis merged commit acb35ed into cockroachdb:release-20.1 Apr 17, 2020
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.

None yet

5 participants