Repository navigation
[8.8-rse] [MOD-18502] Move shard and standalone FAIL reply serialization off the main thread - #11553
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.8-rse #11553 +/- ##
==========================================
Coverage ? 81.21%
==========================================
Files ? 562
Lines ? 76539
Branches ? 30619
==========================================
Hits ? 62164
Misses ? 14087
Partials ? 288
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b06a53a16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| r->useReplyCallback = !r->encodeReplyInBackground; | ||
| blockClientCtx.replyCallback = r->useReplyCallback ? QueryReplyCallback : NULL; |
There was a problem hiding this comment.
Count each FAIL timeout only once
When a FAIL deadline expires after the worker has started, QueryTimeoutFailCallback increments the timeout counter, and this callback-free path then lets the worker reach handleSendChunkError, which increments the same counter again while encoding a reply that Redis discards. The updated assertions at tests/pytests/test_blocked_client_timeout.py:924-926 and :1837-1841 confirm that one timed-out command now adds two to *_total_query_errors_timeout, corrupting monitoring and alert rates. Suppress error-stat updates for the abandoned worker reply, or designate a single timeout owner.
Useful? React with 👍 / 👎.
|


Backport of #11541 to
8.8-rse.Merge commit:
4b9a5820c23e5930041144a7a68f813fd09aa714Describe the changes in the pull request
Shard and standalone SEARCH/AGGREGATE under
ON_TIMEOUT FAILcurrently serialize buffered results on the main thread. This moves reply serialization to the worker while preserving complete-chunk collection, so late APPLY/FILTER errors still replace the entire chunk.Selected FAIL requests use the existing direct serialization path with no reply callback. The blocked-client deadline remains active through encoding; Redis discards the private reply buffer when timeout wins. Cursor completion runs in blocked-client free-data cleanup, freeing timed-out or exhausted cursors and pausing other nonterminal cursors.
This covers RESP2/RESP3, PROFILE, internal shard commands, initial cursors, and cursor READ. RETURN, RETURN_STRICT, coordinator execution, HYBRID, and inline dispatch retain their existing behavior. Serialization uses RETURN's existing spec-lock lifecycle.
Worker metrics count serialization attempts even when timeout discards the reply. When both the timeout callback and worker report a timeout, both increment the module timeout counter.
Backport adaptation: the cursor-dispatch test covers FAIL and RETURN only because RETURN-STRICT is internal-only on 8.8-rse.
Validation on this backport:
test_blocked_client_timeoutandtest_config: 203 tests passed, zero failed assertions (Redis 8.9.241).Follows #11534, merged into
8.10.Which additional issues this PR fixes
MOD-18502
Main objects this PR modified
Mark if applicable
Release Notes