-
Notifications
You must be signed in to change notification settings - Fork 142
Schema agreement error handling #1479
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
base: main
Are you sure you want to change the base?
Schema agreement error handling #1479
Conversation
|
|
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.
Pull Request Overview
This PR improves schema agreement error handling by introducing logic to distinguish between transient and non-transient errors, allowing the schema agreement loop to terminate early when encountering serious issues rather than waiting for the full timeout.
Key Changes:
- Added
classify_schema_check_errorfunction to categorize errors as transient (continue retrying) or non-transient (return immediately) - Refactored
await_schema_agreement_with_required_nodeto useControlFlowfor early termination on non-transient errors - Added documentation noting the misnamed
TracesEventsIntoRowsResultErrorvariant (to be fixed in v2.0)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scylla/src/errors.rs | Added documentation explaining that TracesEventsIntoRowsResultError is misnamed and will be renamed in v2.0 |
| scylla/src/client/session.rs | Introduced error classification logic to enable early termination for non-transient schema agreement errors, restructured timeout handling accordingly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SyntaxError will cause schema agreement process to fail immediately after next commits (that will add error classification there).
0c8ed93 to
31bafbb
Compare
This changes the logic of schema agreement to allow some error to end the process immediately, without waiting until the timeout. For now the error clasification is not done with a lot of effort, just to have something that doesn't treat transient errors as non-transient, but also classify some errors as non-transient.
ad492eb to
b101c79
Compare
After changing schema agreement logic, those tests became slow, as they had to wait until schema agreement timeout in each case, which is by default 60s.
b101c79 to
8bb3718
Compare
In #1451 we are going to more carefully handle errors.
In order to make this easier by only having to work on deciding how to handle each error, this PR introduces changes to schema agreement logic that
allow it to end early for certain errors.
Pre-review checklist
I added relevant tests for new features and bug fixes.I have provided docstrings for the public items that I want to introduce.I have adjusted the documentation in./docs/source/.I added appropriateFixes:annotations to PR description.