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

GH-41988: [Go] Add FormatRecoveredError to consistently handle recovery with wrapped errors #41989

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Jun 5, 2024

Rationale for this change

Part of #36186 (Fixes it, IMO)
Fixes #41988.

What changes are included in this PR?

A new internal FormatRecoveredError() function adds consistency to errors generated from panic recovery.

Are these changes tested?

Yes.

Are there any user-facing changes?

Users will be able to unwrap errors thrown by allocators, for example.

@jmacd jmacd requested a review from zeroshade as a code owner June 5, 2024 15:49
Copy link

github-actions bot commented Jun 5, 2024

⚠️ GitHub issue #41988 has been automatically assigned in GitHub to PR creator.

jmacd added a commit to open-telemetry/otel-arrow that referenced this pull request Jun 5, 2024
Part of #210.

This updates memory-limit error handling because, prior to this fix,
there were two fallbacks.

(1) the use of os.Stderr to print the message that we had lost
(2) a test for the expected number of records to match

The first is now removed (i.e. no printing to os.Stderr). The second is
now an internal error.

The consumer is expected to test for the memory limit error explicitly
(e.g., and handle it as ResourceExhausted). A new function is added to
do this (NewLimitErrorFromError) that parses the message using a regexp.
An upstream issue report and PR will be filed with Arrow-Go to overcome
this in the future.

See apache/arrow#41989.
Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

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

Sorry for the delay here, I've been traveling for a conference. Assuming no issues with the CI tests this looks great! Thanks much!

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Jun 7, 2024
@zeroshade
Copy link
Member

It looks like you need to re-run go mod tidy to update the go.mod etc to fix the failing builds

@jmacd
Copy link
Contributor Author

jmacd commented Jun 10, 2024

@zeroshade Thank you!

@zeroshade zeroshade merged commit 4df00fa into apache:main Jun 11, 2024
23 of 24 checks passed
@jmacd jmacd deleted the jmacd/consistent_error_wrapping branch June 11, 2024 15:20
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 4df00fa.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.

jmacd added a commit to jmacd/otel-arrow that referenced this pull request Jul 16, 2024
Remove a pre-v17 hack that was fixed by apache/arrow#41989.
jmacd added a commit to open-telemetry/otel-arrow that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Go] Wrap recovered errors
2 participants