Open sourceioredis Upstream Fix
Custom commands registered late failed inside auto-pipelining; fixed and tested, then merged by the official project
A Node.js client from the official Redis organization. Reproduced the problem, fixed it and added tests; merged after maintainer review.
Original screens
- Outcome
- PR #2180 merged by the official project; 6 regression tests added
- Role
- Individual contribution: reproduction, fix, regression tests and PR
- Status
- PR #2180 merged
- Tech
- TypeScript · Node.js · Redis · Redis Cluster
Problem Custom commands registered late cannot be found in auto-pipelining
Within one event-loop tick, an earlier command had already created the auto-pipeline; a custom command registered afterwards could not be found in that pipeline. Commands added by a rate-limiting package, for example, failed outright on call.
Callbacks had already been queued, so the replies for the rest of the batch could be misaligned or raise errors. Related issue: #1931.
Scope of contribution Reproduction, fix and tests through to the PR
Individual contribution: reproduced the error, fixed it, added tests and submitted the PR. Developed with Codex assistance and reviewed with CodeRabbit, both disclosed in the PR.
A contribution to an existing open-source package: the fix was reviewed and merged by the upstream maintainers.
Fix Only the lookup of dynamic commands and the order of callback registration changed
Custom and late-added commands are now obtained from the current client and handed to the existing batch execution. Result callbacks are registered only after the command has been successfully enqueued.
Ordinary built-in commands keep the original path; only dynamic commands changed. The public API, dependencies and exclusion rules are unchanged.
Verification 2,209 upstream tests passing, 0 failures; 6 regression tests added
Both errors were reproduced before the fix: command not found, and callbacks misaligned with results.
- Non-Cluster tests: 2,209 passing, 0 failures (455 pending, not counted as passing).
- Real six-node Redis Cluster: 62 passing, 0 failures (4 pending).
- 6 regression tests added; 4 files changed, +255 / −7 lines.
- Environment: Node.js 24.19.0, Redis 7.4.11 (Linux). The PR states that only this version combination was verified.
Status Merged into upstream main
Merged into upstream main. As of 2026-09-24 it was not yet in an official release; the latest release at that time was v6.0.0.
Evidence PR, issue and upstream commit
- PR: redis/ioredis #2180
- Issue: redis/ioredis #1931
- Upstream commit after the merge: 7479cab