Skip to content

[8.4] [MOD-12243] fix: fix concurrency issue on Reducer#7220

Merged
redisearch-backport-pull-request[bot] merged 1 commit into8.4from
backport-7214-to-8.4
Nov 4, 2025
Merged

[8.4] [MOD-12243] fix: fix concurrency issue on Reducer#7220
redisearch-backport-pull-request[bot] merged 1 commit into8.4from
backport-7214-to-8.4

Conversation

@redisearch-backport-pull-request
Copy link
Contributor

@redisearch-backport-pull-request redisearch-backport-pull-request bot commented Nov 4, 2025

Description

Backport of #7214 to 8.4.


Note

Replaces the dynamic reducer registry with a fixed compile-time table, updates RDCR_GetFactory to iterate it, and removes all runtime registration code and declarations.

  • Aggregate/Reducers:
    • Static registry: Introduce static const globalRegistry with 14 built-in reducers and REGISTRY_SIZE + static_assert.
    • Factory lookup: RDCR_GetFactory now iterates the fixed registry (no lazy registration).
    • Removed runtime registration:
      • Delete RDCR_RegisterFactory, RDCR_RegisterBuiltins, isBuiltinsRegistered, and RDCR_XBUILTIN macro in src/aggregate/reducer.c.
      • Remove corresponding declarations from src/aggregate/reducer.h.

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

* fix: fix concurrency issue on Reducer

* test: fix test distagg

* fix: make it static array

* fix: fix proper static

* Update src/module-init/module-init.c

* Update src/aggregate/reducer.c

Co-authored-by: GuyAv46 <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit 7184778)
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.64%. Comparing base (48ee400) to head (c7b434a).
⚠️ Report is 23 commits behind head on 8.4.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #7220      +/-   ##
==========================================
- Coverage   85.67%   85.64%   -0.03%     
==========================================
  Files         327      326       -1     
  Lines       51945    50941    -1004     
  Branches    10921    10921              
==========================================
- Hits        44503    43629     -874     
+ Misses       7276     7146     -130     
  Partials      166      166              
Flag Coverage Δ
flow 84.20% <100.00%> (-0.11%) ⬇️
unit 51.73% <100.00%> (+0.14%) ⬆️

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 Nov 4, 2025
Merged via the queue into 8.4 with commit 99a6f90 Nov 4, 2025
22 checks passed
@redisearch-backport-pull-request redisearch-backport-pull-request bot deleted the backport-7214-to-8.4 branch November 4, 2025 21:12
@JoanFM JoanFM changed the title [8.4] fix: fix concurrency issue on Reducer [8.4] [MOD-12243] fix: fix concurrency issue on Reducer Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant