Skip to content

Conversation

@Lorak-mmk
Copy link
Collaborator

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 have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

@Lorak-mmk Lorak-mmk added this to the 1.5.0 milestone Nov 18, 2025
@Lorak-mmk Lorak-mmk self-assigned this Nov 18, 2025
Copilot finished reviewing on behalf of Lorak-mmk November 18, 2025 15:51
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

cargo semver-checks found no API-breaking changes in this PR.
Checked commit: 8bb3718

Copy link

Copilot AI left a 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_error function to categorize errors as transient (continue retrying) or non-transient (return immediately)
  • Refactored await_schema_agreement_with_required_node to use ControlFlow for early termination on non-transient errors
  • Added documentation noting the misnamed TracesEventsIntoRowsResultError variant (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).
@Lorak-mmk Lorak-mmk force-pushed the schema-agreement-error-handling branch from 0c8ed93 to 31bafbb Compare November 21, 2025 16:59
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.
@Lorak-mmk Lorak-mmk force-pushed the schema-agreement-error-handling branch 3 times, most recently from ad492eb to b101c79 Compare November 21, 2025 17:10
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.
@Lorak-mmk Lorak-mmk force-pushed the schema-agreement-error-handling branch from b101c79 to 8bb3718 Compare November 21, 2025 17:30
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.

1 participant