Fix Redis to reconnect in Sentinel (Chris Staite)#2190
Open
MarcusSorealheis wants to merge 2 commits intomainfrom
Open
Fix Redis to reconnect in Sentinel (Chris Staite)#2190MarcusSorealheis wants to merge 2 commits intomainfrom
MarcusSorealheis wants to merge 2 commits intomainfrom
Conversation
The switch from Fred to Redis-rs caused auto-reconnect in Sentinel to not occur when the primary fails over. Instead, we have to manually take care of detecting a ReadOnly error and performing the re-discovery of the primary and re-connecting. Re-work the Redis store to catch the ReadOnly error in update_data and reconnect. Take a UUID for each connection to ensure we don't spam reconnect attempts from multiple tasks at the same time. Switch the pubsub over to using the ConnectionManager and manage the psubscribe there.
Collaborator
Author
|
We clearly need to roll something back or fix some test that I broke. My apologies @chrisstaite |
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.
The switch from Fred to Redis-rs caused auto-reconnect in Sentinel to not occur when the primary fails over. Instead, we have to manually take care of detecting a ReadOnly error and performing the re-discovery of the primary and re-connecting.
Re-work the Redis store to catch the ReadOnly error in update_data and reconnect. Take a UUID for each connection to ensure we don't spam reconnect attempts from multiple tasks at the same time. Switch the pubsub over to using the ConnectionManager and manage the psubscribe there.
Description
Please include a summary of the changes and the related issue. Please also
include relevant motivation and context.
Fixes # (issue)
Type of change
Please delete options that aren't relevant.
not work as expected)
How Has This Been Tested?
Please also list any relevant details for your test configuration
Checklist
bazel test //...passes locallygit amendsee some docsThis change is