Fix autopipelining to route writes to masters with scaleReads#2072
Merged
PavelPashov merged 1 commit intoredis:mainfrom Jan 30, 2026
Merged
Fix autopipelining to route writes to masters with scaleReads#2072PavelPashov merged 1 commit intoredis:mainfrom
PavelPashov merged 1 commit intoredis:mainfrom
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
PavelPashov
approved these changes
Jan 30, 2026
Contributor
PavelPashov
left a comment
There was a problem hiding this comment.
This looks good, thank you for your contribution
Contributor
Author
|
@PavelPashov Could I ask you for a minor release? |
Contributor
@ivoronin I'm planning to do a minor release next week, as there're other fixes/features that would be great if included |
github-actions bot
pushed a commit
that referenced
this pull request
Feb 12, 2026
## [5.9.3](v5.9.2...v5.9.3) (2026-02-12) ### Bug Fixes * autopipelining to route writes to masters with scaleReads ([#2072](#2072)) ([8adb1ae](8adb1ae)) * fix issue with moved command for replicas ([#2064](#2064)) ([de4eed4](de4eed4)) * **types:** optional properties on RedisOptions allow explicit undefined ([#2066](#2066)) ([0a1a898](0a1a898))
github-actions bot
pushed a commit
that referenced
this pull request
Feb 12, 2026
## [5.9.3](v5.9.2...v5.9.3) (2026-02-12) ### Bug Fixes * autopipelining to route writes to masters with scaleReads ([#2072](#2072)) ([8adb1ae](8adb1ae)) * fix issue with moved command for replicas ([#2064](#2064)) ([de4eed4](de4eed4)) * **types:** optional properties on RedisOptions allow explicit undefined ([#2066](#2066)) ([0a1a898](0a1a898))
|
🎉 This PR is included in version 5.9.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
When
scaleReadsis set toslaveorallandenableAutoPipeliningis enabled, writes may end up going to replicas instead of masters.The problem is that autopipelining groups commands by slot into a single pipeline, and that pipeline goes to whatever node
scaleReadspicks - which can be a replica.This causes the whole pipeline to fail and retry with
MOVEDredirects until by luck it lands on a master, stacking up latency. In the worst case (after 16 failed attempts) theseMOVEDerrors bubble up to user code.The fix separates read and write commands into different pipelines when
scaleReadsis not master. Read commands get a:readsuffix on their slot key, writes get:write. This way they end up in separate pipelines that route correctly.