Hotfixes/cluster#278
Merged
Merged
Conversation
Add routing and forwarding improvements for batch SQL execution and leader-forwarding, plus CI and test tweaks. Key changes: - Add should_route_batch_statements_individually and forward_batch_statement_to_group to forward per-statement queries to the appropriate group leader with retry/backoff for transient metadata visibility errors; integrate into execute_batch_path and forward logic. - Refactor forward.rs to return raw ForwardSqlResponse, convert forwarded responses to HTTP, and expose forward_sql_to_group_leader_raw helper. - Introduce helpers for accumulating batch results and detecting meta-mutating statements; adjust batching semantics to sync transaction state when needed. - Separate non-Raft cluster RPC transport in RaftManager (cluster_network_factory) and use it for peer channels and registrations; use SERVER_VERSION in node metadata and executor responses. - Add a GitHub Actions workflow (cli-cluster-e2e.yml) to run CLI cluster end-to-end tests using a released server binary, and extend nextest.toml overrides to mark many tests as stateful-heavy. - Miscellaneous formatting, minor test and code cleanups across multiple modules. These changes improve correctness and stability when executing multi-statement requests that target different raft groups and add CI coverage for the CLI cluster e2e scenario.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new GitHub Actions workflow for CLI cluster end-to-end (E2E) tests and makes significant improvements to the batch SQL execution path in the API. The batch execution logic now supports forwarding individual statements to group leaders with retry logic for transient metadata errors, and accumulates batch operation results more robustly. Additionally, the
.config/nextest.tomltest configuration has been commented out, likely to simplify or disable test grouping and overrides during CI runs.The most important changes are:
CI/CD Improvements:
.github/workflows/cli-cluster-e2e.ymlto automate cluster E2E testing for the CLI, including version resolution, binary downloading, environment setup, test execution, and log uploading.Batch SQL Execution Path Improvements:
forward_batch_statement_to_group,is_transient_forwarded_metadata_error). [1] [2] [3]push_or_accumulate_batch_result).statement_mutates_meta).Test Configuration:
.config/nextest.toml, effectively disabling custom test isolation and concurrency rules.Dependency and Import Updates:
execution_paths.rsto support new logic (e.g.,Duration,GroupId, additional forward helpers). [1] [2]These changes collectively improve the reliability and maintainability of both the CI system and the SQL API batch execution path.