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-19.2: execerror: user errors package #46092

Merged
merged 1 commit into from Mar 16, 2020

Conversation

asubiotto
Copy link
Contributor

@asubiotto asubiotto commented Mar 13, 2020

Backport 1/2 commits from #45673.

/cc @cockroachdb/release


execerror: use errors package

We previously would unwrap a notVectorizedInternalError when first catching it,
which mean that we would lose that information and be unable to propagate its
underlying cause without annotating it if caught again (since we only check
for a *notVectorizedInternal wrapper). Instead, this patch changes the
CatchVectorizedRuntimeError function to leave the error object unwrapped when
doing its annotation. *notVectorizedInternalError is now enhanced so that it
can be sent over the wire unwrapped and propagated as many times as necessary
through CatchVectorizedRuntimeError without losing information.

Release note (bug fix): expected errors from the vectorized execution engine
are no longer mistakenly annotated as unexpected errors.

@asubiotto asubiotto requested review from yuzefovich and a team March 13, 2020 18:27
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

:lgtm:

nit: PR description needs an update.

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

We previously would unwrap a notVectorizedInternalError when first catching it,
which mean that we would lose that information and be unable to propagate its
underlying cause without annotating it if caught again (since we only check
for a *notVectorizedInternal wrapper). Instead, this patch changes the
CatchVectorizedRuntimeError function to leave the error object unwrapped when
doing its annotation. *notVectorizedInternalError is now enhanced so that it
can be sent over the wire unwrapped and propagated as many times as necessary
through CatchVectorizedRuntimeError without losing information.

Release note (bug fix): expected errors from the vectorized execution engine
are no longer mistakenly annotated as unexpected errors.
@asubiotto asubiotto merged commit c31e118 into cockroachdb:release-19.2 Mar 16, 2020
@asubiotto asubiotto deleted the backport19.2-45673 branch March 16, 2020 10:59
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

3 participants