Skip to content

Hotfixes/cluster#278

Merged
jamals86 merged 3 commits into
mainfrom
hotfixes/cluster
May 13, 2026
Merged

Hotfixes/cluster#278
jamals86 merged 3 commits into
mainfrom
hotfixes/cluster

Conversation

@jamals86
Copy link
Copy Markdown
Member

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.toml test 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:

  • Added a new workflow file .github/workflows/cli-cluster-e2e.yml to automate cluster E2E testing for the CLI, including version resolution, binary downloading, environment setup, test execution, and log uploading.

Batch SQL Execution Path Improvements:

  • Implemented logic to forward individual statements in a batch to the appropriate group leader, with retries for transient metadata lag errors using exponential backoff (forward_batch_statement_to_group, is_transient_forwarded_metadata_error). [1] [2] [3]
  • Improved result accumulation for batch operations, aggregating inserted/updated/deleted counts when appropriate (push_or_accumulate_batch_result).
  • Added logic to detect and track if a batch statement mutates metadata, influencing retry and routing behavior (statement_mutates_meta).

Test Configuration:

  • Commented out all test-group and override configurations in .config/nextest.toml, effectively disabling custom test isolation and concurrency rules.

Dependency and Import Updates:

  • Updated imports in execution_paths.rs to 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.

jamals86 added 3 commits May 13, 2026 16:38
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.
@jamals86 jamals86 merged commit 174733b into main May 13, 2026
1 of 2 checks passed
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