Skip to content

[2.6] fix: fix concurrency issue on Reducer#7217

Closed
redisearch-backport-pull-request[bot] wants to merge 1 commit into2.6from
backport-7214-to-2.6
Closed

[2.6] fix: fix concurrency issue on Reducer#7217
redisearch-backport-pull-request[bot] wants to merge 1 commit into2.6from
backport-7214-to-2.6

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 2.6.


Note

Replaces dynamic reducer factory registration with a fixed compile-time registry and updates RDCR_GetFactory to scan it; removes registration APIs/macros.

  • Aggregate reducers (src/aggregate/reducer.c, src/aggregate/reducer.h):
    • Replace dynamic global registry with a static globalRegistry array of builtin reducers and a fixed REGISTRY_SIZE validated via static_assert.
    • Update RDCR_GetFactory to iterate over the fixed registry.
    • Remove runtime registration APIs (RDCR_RegisterFactory, RDCR_RegisterBuiltins) and related macros/constants.

Written by Cursor Bugbot for commit 6ea0d97. 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 86.31%. Comparing base (e1b6938) to head (6ea0d97).

Additional details and impacted files
@@            Coverage Diff             @@
##              2.6    #7217      +/-   ##
==========================================
- Coverage   86.41%   86.31%   -0.11%     
==========================================
  Files         186      186              
  Lines       32270    31508     -762     
==========================================
- Hits        27887    27196     -691     
+ Misses       4383     4312      -71     
Flag Coverage Δ
flow 80.03% <100.00%> (-0.30%) ⬇️
unit 46.00% <100.00%> (-0.27%) ⬇️

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.

@JoanFM JoanFM closed this Nov 4, 2025
auto-merge was automatically disabled November 4, 2025 21:24

Pull request was closed

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