Skip to content

[2.8] [MOD-12243] fix: fix concurrency issue on Reducer#7216

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

[2.8] [MOD-12243] fix: fix concurrency issue on Reducer#7216
redisearch-backport-pull-request[bot] merged 1 commit into2.8from
backport-7214-to-2.8

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


Note

Switches reducer factory registration from dynamic runtime registration to a fixed static registry and updates lookup accordingly.

  • Aggregate/Reducer:
    • Implement a static builtin registry in src/aggregate/reducer.c with fixed entries (e.g., COUNT, SUM, MIN, MAX, AVG, COUNT_DISTINCT, QUANTILE, STDDEV, FIRST_VALUE, RANDOM_SAMPLE, HLL, HLL_SUM) guarded by REGISTRY_SIZE and static_assert.
    • Simplify RDCR_GetFactory to iterate the fixed array; remove dynamic array usage.
    • Remove runtime registration flow: delete RDCR_RegisterFactory, RDCR_RegisterBuiltins, and associated macros; drop their declarations from src/aggregate/reducer.h.

Written by Cursor Bugbot for commit d19b5a9. 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 87.45%. Comparing base (61dec11) to head (d19b5a9).
⚠️ Report is 1 commits behind head on 2.8.

Additional details and impacted files
@@            Coverage Diff             @@
##              2.8    #7216      +/-   ##
==========================================
- Coverage   87.48%   87.45%   -0.04%     
==========================================
  Files         203      203              
  Lines       34793    34783      -10     
==========================================
- Hits        30438    30418      -20     
- Misses       4355     4365      +10     
Flag Coverage Δ
flow 81.82% <100.00%> (-0.25%) ⬇️
unit 42.48% <100.00%> (-0.02%) ⬇️

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 2.8 with commit f8b2cec Nov 4, 2025
14 checks passed
@redisearch-backport-pull-request redisearch-backport-pull-request bot deleted the backport-7214-to-2.8 branch November 4, 2025 21:23
@JoanFM JoanFM changed the title [2.8] fix: fix concurrency issue on Reducer [2.8] [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