Repository navigation
[MOD-14086] Coordinator-level FT.AGGREGATE: use blocked-client FAIL timeout mechanism - #8752
Merged
Merged
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
lerman25
force-pushed
the
omerl-agg-coord-blocked-fail
branch
from
March 18, 2026 20:51
04a923b to
ba3730b
Compare
lerman25
force-pushed
the
omerl-agg-coord-blocked-fail
branch
from
March 31, 2026 12:06
ba3730b to
325f52e
Compare
lerman25
marked this pull request as ready for review
March 31, 2026 12:08
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8752 +/- ##
==========================================
- Coverage 81.69% 81.46% -0.23%
==========================================
Files 471 472 +1
Lines 64697 65082 +385
Branches 21743 22307 +564
==========================================
+ Hits 52853 53019 +166
- Misses 11601 11818 +217
- Partials 243 245 +2
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:
|
meiravgri
reviewed
Apr 12, 2026
meiravgri
left a comment
Contributor
There was a problem hiding this comment.
im (almost) speachless
Well done
|
meiravgri
approved these changes
Apr 13, 2026
1 of 4 tasks
1 of 2 tasks
pierrelambert
pushed a commit
to pierrelambert/RediSearch
that referenced
this pull request
May 13, 2026
…nism (RediSearch#8752) * Initial * initial tests * fix debug * fix failing test * refix * fix barrier test * fix debug condition * draft - metric refactor * Revert "draft - metric refactor" This reverts commit 9cf2a8f. * fix tests * test metric properly * fix internal * fix leak * ASSERT CoordRequestCtx hybrid or agg
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
Current: Coordinator-level
FT.AGGREGATErespects theFAILtimeout policy via clock-based checks during query execution, but does not use the new blocked-client timeout mechanism introduced in #8191.Change: Wire up
reply_callback(DistAggregateReplyCallback),timeout_callback(DistAggregateTimeoutFailClient), andfree_privdata(DistCoordReqFreePrivData) for coordinator-levelFT.AGGREGATEusing the existingCoordRequestCtxcoordination pattern. ExtractAREQ_ReplyOrStoreErrorandAREQ_ReplyWithStoredResultsas public helpers so both shard and coordinator reply paths can reuse them.Outcome: Coordinator-level
FT.AGGREGATEnow uses the blocked-client timeout mechanism for theFAILpolicy, consistent withFT.SEARCHandFT.HYBRID.Previous PRs in this series
FT.SEARCH: new blocked-client FAIL timeoutFT.SEARCH/FT.AGGREGATE: new blocked-client FAIL timeoutFT.HYBRID: blocked-client FAIL timeoutreply_callbackpattern for all coordinator commandsFT.HYBRID: blocked-client FAIL timeoutMain objects this PR modified
src/coord/dist_aggregate.c— AddedDistAggregateReplyCallback,DistAggregateTimeoutFailClient; updatedRSExecDistAggregateto checkCoordRequestCtxtimed-out flag and register the AREQ; updatedDistAggregateCleanupsto useAREQ_ReplyOrStoreError.src/aggregate/aggregate_exec.c— ExtractedAREQ_ReplyWithStoredResultsfromQueryReplyCallback; madeAREQ_ReplyOrStoreErrorpublic.src/aggregate/aggregate.h— ExportedAREQ_ReplyOrStoreErrorandAREQ_ReplyWithStoredResults.src/module.c— Added timeout/reply/free callback setup inDistAggregateCommandImp; sharedDistCoordReqFreePrivDatawith hybrid path.tests/pytests/test_blocked_client_timeout.py— Added coordinator-level FT.AGGREGATE tests: basic timeout, profile timeout, timeout before pickup, timeout before/after store, and no-timeout verification.Mark if applicable
Release Notes
Note
Medium Risk
Moves coordinator
FT.AGGREGATEtimeout/error handling onto blocked-client reply/timeout callbacks and refactors shared reply logic, which can impact query lifecycle, cursor cleanup, and error/metric reporting under timeouts.Overview
Coordinator-level
FT.AGGREGATEnow uses the blocked-client timeout mechanism forON_TIMEOUT FAIL, wiring newDistAggregateReplyCallback/DistAggregateTimeoutFailClientand a sharedCoordRequestCtxprivdata lifecycle (including locking to avoid request/timeout races).Shared aggregate reply/error handling is refactored into exported helpers (
AREQ_ReplyOrStoreError,AREQ_ReplyWithStoredResults), with additional fixes around stored error ownership,SearchResultcleanup in reply-callback paths, and coordinator timeout-check gating viaskipTimeoutChecks/AREQ_ShouldCheckTimeout.Tests are updated/expanded to cover coordinator
FT.AGGREGATEblocked-client timeouts (including profile, before/after store, before pickup) and to assert correct timeout metric increments; debugTIMEOUT_AFTER_Ndocs/constraints are clarified and some shard-timeout tests adjusted/removed.Reviewed by Cursor Bugbot for commit 0ee26eb. Bugbot is set up for automated code reviews on this repo. Configure here.