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

sql: deal with retriable errors in DROP INDEX #49221

Conversation

ajwerner
Copy link
Contributor

Prior to this commit we would assume any error while retrieving a descriptor
during the execution of DROP INDEX was an assertion failure. This was
overly paranoid. Plenty of retriable errors are possible (and furthermore
so are errors due to shutdown). The only error we should freak out about
is if we discover the relation is not defined.

Fixes #48474.

Release note (bug fix): Fix bug where contended DROP INDEX queries return
an assertion failure error rather than a retriable error.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajwerner ajwerner force-pushed the ajwerner/close-issue-hopefully-fixed-by-using-user-txn-for-planning branch from e5f77ee to 24e999f Compare May 18, 2020 22:25
@ajwerner ajwerner requested review from spaskob and thoszhang May 19, 2020 14:10
Copy link
Contributor

@thoszhang thoszhang left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @spaskob)

Prior to this commit we would assume any error while retrieving a descriptor
during the execution of `DROP INDEX` was an assertion failure. This was
overly paranoid. Plenty of retriable errors are possible (and furthermore
so are errors due to shutdown). The only error we should freak out about
is if we discover the relation is not defined.

Fixes cockroachdb#48474.

Release note (bug fix): Fix bug where contended `DROP INDEX` queries return
an assertion failure error rather than a retriable error.
@ajwerner ajwerner force-pushed the ajwerner/close-issue-hopefully-fixed-by-using-user-txn-for-planning branch from 24e999f to 1d421da Compare May 19, 2020 15:00
Copy link
Contributor

@spaskob spaskob 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! 0 of 0 LGTMs obtained (waiting on @spaskob)

@ajwerner
Copy link
Contributor Author

TFTR!

bors r=spaskob,lucy-zhang

@craig
Copy link
Contributor

craig bot commented May 19, 2020

Build succeeded

@craig craig bot merged commit 2235a75 into cockroachdb:master May 19, 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.

sql: v19.2.2: drop index: table descriptor became unavailable within same txn
4 participants