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/schemachanger: avoid retries on invalid expressions during backfills #142490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Mar 7, 2025

Currently, the schema changer uses a white list to determine which errors to be retired, which in some cases use a text comparison. Unfortunately, when we parse expressions their text can appear in the error and cause errors to be erroneously retried for backfills. To address this, this patch explicitly wraps errors from eval.Expr with SchemaChangerUserError to block retries.

Fixes: #141352

Release note (bug fix): Invalid default expressions could cause backfilling schema changes to retry forever

@fqazi fqazi requested a review from a team as a code owner March 7, 2025 20:19
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Currently, the schema changer uses a white list to determine which
errors to be retired, which in some cases use a text comparison.
Unfortunately, when we parse expressions their text can appear in the
error and cause errors to be erroneously retried for backfills. To
address this, this patch explicitly wraps errors from eval.Expr with
SchemaChangerUserError to block retries.

Fixes: cockroachdb#141352

Release note (bug fix): Invalid default expressions could cause
backfilling schema changes to retry forever
@fqazi fqazi force-pushed the createIndexParseErrorFix branch from 418bf6b to b5c6d29 Compare March 7, 2025 22:17
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.

schemachanger: CREATE INDEX is stuck on a retriable parse error
2 participants