[8.4] [MOD-12005] Add slot ranges comparison logic#7175
Merged
redisearch-backport-pull-request[bot] merged 1 commit into8.4from Oct 28, 2025
Merged
[8.4] [MOD-12005] Add slot ranges comparison logic#7175redisearch-backport-pull-request[bot] merged 1 commit into8.4from
redisearch-backport-pull-request[bot] merged 1 commit into8.4from
Conversation
* initial registration implementation * Set up most of the notification events * address review comment and add logs * implement propagation * minor improvements * small fix * review fixes * [TEMP] set CI for new API * dictionary tidy up * add first test * fix helper and test for duplicates * Add missing sub-command * add unit-tests for coverage * change workersThreadPool_OnEvent* behavior to handle overlapping events * rename events after API update * implement managed and thread-safe slot ranges API * drop cached API when needed * rename API and use in the pipeline * move includes to C file * skip current flow test, and introduce a stable one * fix initial reference count * implement mock and add a test * add missing key-space notification subscription * add a test with adding a new node and propagating the schema * review fixes * fix assertion * leak fix * use malloc * leak actual fix * don't drop the cache on failed events * add BG variants to flow tests * initial registration implementation * Set up most of the notification events * address review comment and add logs * implement propagation * minor improvements * small fix * review fixes * [TEMP] set CI for new API * dictionary tidy up * add first test * fix helper and test for duplicates * Add missing sub-command * add unit-tests for coverage * change workersThreadPool_OnEvent* behavior to handle overlapping events * rename events after API update * implement managed and thread-safe slot ranges API * drop cached API when needed * rename API and use in the pipeline * move includes to C file * skip current flow test, and introduce a stable one * fix initial reference count * implement mock and add a test * add missing key-space notification subscription * add a test with adding a new node and propagating the schema * review fixes * fix assertion * leak fix * use malloc * leak actual fix * don't drop the cache on failed events * add BG variants to flow tests * feat: add slot ranges comparition logic * fix: change implementation * fix problems merging * fix problems merging * fix problems merging --------- Co-authored-by: GuyAv46 <guy.avimor@gmail.com> (cherry picked from commit 70486dc)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.4 #7175 +/- ##
==========================================
- Coverage 85.67% 85.63% -0.04%
==========================================
Files 327 326 -1
Lines 51945 50952 -993
Branches 10921 10921
==========================================
- Hits 44503 43632 -871
+ Misses 7276 7154 -122
Partials 166 166
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JoanFM
approved these changes
Oct 28, 2025
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.
Description
Backport of #7130 to
8.4.Note
Introduce
CompareSlotRangeswithSlotRangesComparisonResultto compare slot range arrays, plus comprehensive C++ unit tests.CompareSlotRangesinsrc/slot_ranges.creturningSlotRangesComparisonResult(MATCH,SUBSET,DOES_NOT_INCLUDE), with fast-path equality and coverage-based subset logic.SlotInRanges.src/slot_ranges.hto declare new API, result enum, forward declareRedisModuleSlotRangeArray, and add C linkage guards.tests/cpptests/test_cpp_slot_ranges.cppwith unit tests covering exact match, subset (single/multiple), non-inclusion, partial overlaps, single-slot, overlapping actual ranges, complex multi-range cases, gaps, empty intersection, boundaries, and max slot values.Written by Cursor Bugbot for commit 35f1ab6. This will update automatically on new commits. Configure here.