Skip to content

Add retriable/transient exceptions #128

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

Merged
merged 2 commits into from
Apr 14, 2025
Merged

Add retriable/transient exceptions #128

merged 2 commits into from
Apr 14, 2025

Conversation

ryannedolan
Copy link
Collaborator

Summary

  • Throw SQLNonTransientException (or derivative) for validation errors, etc.
  • Throw SQLTransientConnectionException for IO errors encountered when loading the catalog, etc.

Details

Calcite frequently uses unchecked exceptions, and Hoptimator follows that pattern where necessary. Unfortunately, this means client code often receives opaque RuntimeExceptions. Where possible, we want to instead throw SQL[Non]TransientException, s.t. client code can decide whether to retry or surface an error to users.

Testing

None. Client code will be tested externally.

N.B. we don't expect 100% coverage wrt this transient-vs-non-transient distinction at this point. As future RuntimeExceptions are encountered, we may need to revisit this problem.

@ryannedolan ryannedolan enabled auto-merge (squash) April 14, 2025 20:02
Copy link
Collaborator

@jogrogan jogrogan left a comment

Choose a reason for hiding this comment

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

Nice!

@ryannedolan ryannedolan merged commit 040d574 into main Apr 14, 2025
1 check passed
@ryannedolan ryannedolan deleted the retriable-exceptions branch April 14, 2025 20:33
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.

2 participants