[MOD-12640] Handle warnings in empty FT.AGGREGATE replies (cluster)#7855
Merged
[MOD-12640] Handle warnings in empty FT.AGGREGATE replies (cluster)#7855
Conversation
use at the end of the reply or when empty reply is recieved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7855 +/- ##
==========================================
- Coverage 84.16% 84.06% -0.10%
==========================================
Files 360 360
Lines 56242 56295 +53
Branches 15686 15717 +31
==========================================
- Hits 47335 47326 -9
- Misses 8690 8753 +63
+ Partials 217 216 -1
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:
|
testEmptyReplyTimeoutWarningAggregate get stuck if we remove enforcing coord timeout testEmptyReplyTimeoutWarningProfileAggregate we dont get warning
lerman25
approved these changes
Dec 23, 2025
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.2
git worktree add -d .worktree/backport-7855-to-8.2 origin/8.2
cd .worktree/backport-7855-to-8.2
git switch --create backport-7855-to-8.2
git cherry-pick -x 701f7190c77d1854e7c23d2b9d6b7b308ef4ce0b |
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.4
git worktree add -d .worktree/backport-7855-to-8.4 origin/8.4
cd .worktree/backport-7855-to-8.4
git switch --create backport-7855-to-8.4
git cherry-pick -x 701f7190c77d1854e7c23d2b9d6b7b308ef4ce0b |
meiravgri
added a commit
that referenced
this pull request
Dec 23, 2025
…7855) * introduce setWarnings use at the end of the reply or when empty reply is recieved * fixes * cleanups fix test * fix force timeout in debug * add tests: testEmptyReplyTimeoutWarningAggregate get stuck if we remove enforcing coord timeout testEmptyReplyTimeoutWarningProfileAggregate we dont get warning * more tests * move to file * fix type * remove comment * rename test file * add testEmptyReplyQueryOomWarning address todos * trmobr skip duplication * check waning exact (cherry picked from commit 701f719)
meiravgri
added a commit
that referenced
this pull request
Dec 24, 2025
…7855) * introduce setWarnings use at the end of the reply or when empty reply is recieved * fixes * cleanups fix test * fix force timeout in debug * add tests: testEmptyReplyTimeoutWarningAggregate get stuck if we remove enforcing coord timeout testEmptyReplyTimeoutWarningProfileAggregate we dont get warning * more tests * move to file * fix type * remove comment * rename test file * add testEmptyReplyQueryOomWarning address todos * trmobr skip duplication * check waning exact (cherry picked from commit 701f719)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 24, 2025
…ter) (#7872) [MOD-12640] Handle warnings in empty FT.AGGREGATE replies (cluster) (#7855) * introduce setWarnings use at the end of the reply or when empty reply is recieved * fixes * cleanups fix test * fix force timeout in debug * add tests: testEmptyReplyTimeoutWarningAggregate get stuck if we remove enforcing coord timeout testEmptyReplyTimeoutWarningProfileAggregate we dont get warning * more tests * move to file * fix type * remove comment * rename test file * add testEmptyReplyQueryOomWarning address todos * trmobr skip duplication * check waning exact (cherry picked from commit 701f719)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 24, 2025
…ter) (#7855) (#7873) * [MOD-12640] Handle warnings in empty FT.AGGREGATE replies (cluster) (#7855) * introduce setWarnings use at the end of the reply or when empty reply is recieved * fixes * cleanups fix test * fix force timeout in debug * add tests: testEmptyReplyTimeoutWarningAggregate get stuck if we remove enforcing coord timeout testEmptyReplyTimeoutWarningProfileAggregate we dont get warning * more tests * move to file * fix type * remove comment * rename test file * add testEmptyReplyQueryOomWarning address todos * trmobr skip duplication * check waning exact (cherry picked from commit 701f719) * fix if * reomve query oom test
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.
Fix coordinator ignoring warnings from
FT.AGGREGATEwhen shards return empty results in cluster mode (RESP3).Problem
When shards returned empty results with warnings (e.g., timeout, max prefix expansions, indexing OOM), the coordinator discarded the reply without processing warnings:
The reply was freed and nullified without checking for warnings in the metadata.
processWarningsAndCleanup()FunctionNew helper function that:
nc->current.meta)QUERY_ERROR_CODE_TIMED_OUT→ returnsRS_RESULT_TIMEDOUTQUERY_WMAXPREFIXEXPANSIONS→ sets max prefix expansion warningQUERY_WOOM_SHARD→ sets OOM warningQUERY_WINDEXING_FAILURE→ setsbgScanOOMflagSolution
Call
processWarningsAndCleanup()for empty replies (not just when all rows are consumed):Note
Fixes warning propagation for empty replies in cluster (RESP3)
processWarningsAndCleanup()inrpnet.cand calls it when shard replies are empty and when a batch is fully consumed; extracts RESP3warningmetadata (timeout →RS_RESULT_TIMEDOUT, max-prefix, query OOM, indexing OOM), then frees reply and resets state.nc->current.{root,rows,meta}are set before empty-reply handling.aggregate_debug.c, only force a coordinator timeout forTIMEOUT_AFTER_N 0 INTERNAL_ONLYunder RESP2; RESP3 now relies on propagated warnings. Header docs updated to clarify RESP3 vs RESP2 behavior.test_empty_reply_warnings.py; updatestest_info_modules.pyandtest_query_oom.pyto assert warnings/metrics for FT.AGGREGATE and PROFILE under RESP3 (and RESP2 expectations where applicable).Written by Cursor Bugbot for commit 0bfa9e8. This will update automatically on new commits. Configure here.