Conversation
Signed-off-by: Gregory Giecold <ggiecold@nvidia.com> (cherry picked from commit 276cddd204f662bc2e3d97881ac7315d35b3f7fc)
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.
Outcome
Fixes
REDIS_CLOSE_CONNECTION_ON_READONLY_ERROR=trueso Redis READONLY replies inside pipelined commands also cause the pooled connection to be discarded and re-dialed.Impact
Deployments that fail over by repointing an address at the new master can recover stale pooled connections even when the failing write is part of the normal INCRBY/EXPIRE pipeline. The failing operation still returns its READONLY error to the caller; only connection handling changes.
Scope
REDIS_CLOSE_CONNECTION_ON_READONLY_ERRORis enabled.radix.NewPipeline().Remaining gate
This is Draft for maintainer review. It was intentionally based on older commit
8fe6ea421048bdb2a8873d5f676b3f6eac76a997to keep the branch push-compatible with the current GitHub token permissions. It should be reviewed with #1255 as compatible but separate work; #1255 handles closing connections on context cancellation, while this PR handles READONLY replies inside pipelines.Compatibility with #1255
Locally merged this branch with #1255 (
tmp/pr-1255-close-on-cancel) without conflicts. Focused Redis tests and race tests passed on the composed branch.Verification
Composed with #1255: