Skip to content

[8.6] Fixed an edge case where a shard that hasn't yet received cluster topology could reject internal queries with 'Query requires unavailable slots' during the first moments after server startup - [MOD-13828]#8395

Merged
redisearch-backport-pull-request[bot] merged 1 commit into
8.6from
backport-8388-to-8.6
Feb 16, 2026

Conversation

@redisearch-backport-pull-request
Copy link
Copy Markdown
Contributor

@redisearch-backport-pull-request redisearch-backport-pull-request Bot commented Feb 16, 2026

Description

Backport of #8388 to 8.6.

Describe the changes in the pull request

Fix an edge case where some shard doesn't know the topology yet, but has to reply to some internal query from another shard. We prefer the shard to accept the request rather than fail with "Query requires unavailable slots". The uninitialized shard cannot be a coordinator until it knows the topology, and this change doesn't affect that.

Main objects this PR modified

  1. slots tracker

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.

  • OSS users - the issue could happen in the first second of the server spawn
  • RE users - should not affect production yet

Note

Medium Risk
Changes the default slot-availability behavior at startup, which can affect whether internal queries are accepted/rejected until topology is received. While scoped to slots tracking, it touches correctness-critical routing/availability logic and relies on updated initialization assumptions.

Overview
Fixes an early-startup edge case by changing SlotsTracker initialization to treat a shard with no known cluster topology as owning the full slot range (0..16383), avoiding transient "unavailable slots" rejections.

This removes the const fn/derived Default path (adds a manual Default impl) and updates unit tests to explicitly simulate import/no-local-slots scenarios via set_local_slots(&[]). The FFI thread-local tracker initialization is adjusted accordingly to use the non-const constructor.

Written by Cursor Bugbot for commit 00aa595. This will update automatically on new commits. Configure here.

…ology could reject internal queries with 'Query requires unavailable slots' during the first moments after server startup - [MOD-13828] (#8388)

* initialize SlotsTracker with all slots

* fix default implementation

(cherry picked from commit 7365bbd)
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Feb 16, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.83%. Comparing base (ab12b48) to head (00aa595).
⚠️ Report is 2 commits behind head on 8.6.

Files with missing lines Patch % Lines
...c/redisearch_rs/slots_tracker/src/slots_tracker.rs 85.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              8.6    #8395   +/-   ##
=======================================
  Coverage   83.82%   83.83%           
=======================================
  Files         367      367           
  Lines       55559    55576   +17     
  Branches    14302    14319   +17     
=======================================
+ Hits        46574    46593   +19     
+ Misses       8824     8822    -2     
  Partials      161      161           
Flag Coverage Δ
flow 84.77% <ø> (+0.01%) ⬆️
unit 50.54% <85.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@redisearch-backport-pull-request redisearch-backport-pull-request Bot added this pull request to the merge queue Feb 16, 2026
Merged via the queue into 8.6 with commit 22dfe8c Feb 16, 2026
62 of 63 checks passed
@redisearch-backport-pull-request redisearch-backport-pull-request Bot deleted the backport-8388-to-8.6 branch February 16, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant