-
Notifications
You must be signed in to change notification settings - Fork 114
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
errors: metadata errors refactor #1170
Conversation
3e1aa4e
to
6283bee
Compare
See the following report for details: cargo semver-checks output
|
54f07fb
to
898b1f8
Compare
898b1f8
to
43d9989
Compare
v1.1: addressed comments |
43d9989
to
d51d4f2
Compare
Rebased on main |
d51d4f2
to
cbeece8
Compare
v2: applied @Lorak-mmk suggestion. Introduced |
This error type will contain information about why metadata fetch failed. Existing enums (UdtMetadataError etc) will now contain only logical errors related to the metadata verification - for example, if we detect the circular dependency in UDT definitions. This commit does not do any changes to the logic yet. It only introduces new error type and adjust the documentation of MetadataError.
This also allows us to remove the FIXME regarding DbError returned from cassandra clusters during metadata fetch.
New error type is `MetadataFetchErrorKind`. Caller converts it to MetadataFetchError with appropriate context for the queried table.
This functions cannot fail.
These are the remnants from the old error handling system - before MetadataFetchError was introduced. As we can see, there are no logical errors related to materialized views metadata.
cbeece8
to
1d10e56
Compare
Rebased on main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the new errors here!
Ref: #519
Motivation
The goal of this PR is to purge
metadata.rs
ofQueryError
, and replace it withMetadataError
. Thanks to that metadata related functions are now independent ofQueryError
.I tried to split this PR into commits, so each commit handles one function/method from metadata module. New error variants are introduced where necessary.
When it comes to public API - after this PR
Session::refresh_metadata()
will now returnMetadataError
.Pre-review checklist
[ ] I added relevant tests for new features and bug fixes.[ ] I have adjusted the documentation in./docs/source/
.Fixes:
annotations to PR description.