-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentinel role support #114
Open
melo
wants to merge
12
commits into
master
Choose a base branch
from
sentinel-role-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Signed-off-by: Pedro Melo <[email protected]>
* add brief introduction to new(); * explain the order in which the multiple connection methods will be evaluated; * break the server section into one per connection method. Signed-off-by: Pedro Melo <[email protected]>
allows sentinel-controlled connections to a slave of the service. Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Allows user to pick and choose the type of server to connect to, master or slave. Corner case where we end up connected to the wrong type of server because we are in the middle of a failover operation is *not* handled yet... Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Signed-off-by: Pedro Melo <[email protected]>
Added some tests, I'll see the reconnect tomorrow... |
@dams care to review this? :) |
at first glance it looks good to me, I'll have a detailed look a bit later. Thanks for the work ! |
dams
force-pushed
the
master
branch
2 times, most recently
from
August 17, 2020 08:16
e5ccb43
to
0dfcf02
Compare
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.
This is still work in progress. It works, but there is stuff missing.
In particular:
The first item should be easy, I just need some time with the sentinel tests to understand them well.
The second, I think the best bet is make the code path for Sentinel-based connections to be the same as the "reconnect on" path. We get reconnects for free if we have the wrong server Role, and the build sock stuff already takes care of going through Sentinel to pick up a new server.
Anyway, please review…
Test script during development: