[MOD-12243] fix: fix concurrency issue on Reducer#7214
Merged
Conversation
GuyAv46
previously approved these changes
Nov 4, 2025
Collaborator
GuyAv46
left a comment
There was a problem hiding this comment.
Baffling why is it even registered lazily.
Consider replacing the dynamic array with a static one
3d00db7 to
230c891
Compare
GuyAv46
reviewed
Nov 4, 2025
JoanFM
commented
Nov 4, 2025
GuyAv46
reviewed
Nov 4, 2025
Co-authored-by: GuyAv46 <[email protected]>
GuyAv46
approved these changes
Nov 4, 2025
dor-forer
approved these changes
Nov 4, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7214 +/- ##
==========================================
- Coverage 85.23% 85.21% -0.03%
==========================================
Files 341 341
Lines 52603 52593 -10
Branches 12526 12526
==========================================
- Hits 44835 44815 -20
- Misses 7576 7586 +10
Partials 192 192
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:
|
redisearch-backport-pull-request bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
* 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)
Contributor
|
Successfully created backport PR for |
redisearch-backport-pull-request bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
* 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)
Contributor
|
Successfully created backport PR for |
redisearch-backport-pull-request bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
* 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)
Contributor
|
Successfully created backport PR for |
redisearch-backport-pull-request bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
* 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)
Contributor
|
Successfully created backport PR for |
redisearch-backport-pull-request bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
* 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)
Contributor
|
Successfully created backport PR for |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
fix: fix concurrency issue on Reducer (#7214) * 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 --------- (cherry picked from commit 7184778) Co-authored-by: Joan Fontanals <[email protected]> Co-authored-by: GuyAv46 <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
fix: fix concurrency issue on Reducer (#7214) * 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 --------- (cherry picked from commit 7184778) Co-authored-by: Joan Fontanals <[email protected]> Co-authored-by: GuyAv46 <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
fix: fix concurrency issue on Reducer (#7214) * 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 --------- (cherry picked from commit 7184778) Co-authored-by: Joan Fontanals <[email protected]> Co-authored-by: GuyAv46 <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
fix: fix concurrency issue on Reducer (#7214) * 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 --------- (cherry picked from commit 7184778) Co-authored-by: Joan Fontanals <[email protected]> Co-authored-by: GuyAv46 <[email protected]>
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.
Describe the changes in the pull request
The method
RDCR_GetFactorymau be called from different threads and the lazy Initialization can lead to a crash because of lack of concurrency.Note
Use a compile-time static registry for reducers and iterate it in
RDCR_GetFactory, removing lazy initialization and runtime registration.globalRegistry) of 14 reducers andstatic_assertsize check.RDCR_GetFactoryto scan the fixed-size registry without lazy init or synchronization.RDCR_RegisterFactory,RDCR_RegisterBuiltins, andRDCR_XBUILTIN.Written by Cursor Bugbot for commit bddbe73. This will update automatically on new commits. Configure here.