fix(client): apply the command timeout and abortSignal to queued MULTI and pipelines #3515
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.45) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 452 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.366
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3515"
general
weight: 0.35
Arthur031221
Description
First of the two PRs for #3504, built on #3506 and #3507.
multi().exec()andexecAsPipeline()ignoredtimeoutandabortSignal, so a batch queued during a reconnect waited past the timeout. NowRedisCommandsQueue.addBatchgives the first command one timer and one abort listener for the whole batch, from the client options orwithCommandOptions()/withAbortSignal(). If either fires before the first write, the whole batch is rejected (once written, it runs to the end) and a transaction keeps its WATCH state. The design's write-time WATCH recheck is not here: a watched batch queued when the socket drops acts as on master.Behavior change for the release notes: with the 5 s default, a batch wholly queued for 5 s, say during a reconnect, now rejects with
TimeoutErrorinstead of resolving later.timeout: 0orundefinedopts out. Cluster, sentinel and pool batches use the node client's options until the second PR.New tests in both spec files next to the code.
---
Checklist
npm testpass with this change (including linting)?Assisted by Claude/Codex.
<!-- CURSOR_SUMMARY -->
---
<!-- /CURSOR_SUMMARY -->