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
Allow replica-priority value of -1 #8437
Conversation
👍 |
584ff3f
to
951b576
Compare
The 'sentinel replicas <master>' command will ignore replicas with priority of -1. As the value 0, the replica is marked as not able to perform the role of master.
951b576
to
db412f8
Compare
Hello @fatpat - sounds like a nice feature to have. I wonder if any of the Sentinel users that are monitoring this project out there could provide additional feedback about it. |
no one ? |
Actually not "no one", but only a couple of upvotes. Getting feedback is a known hard problem. @yossigo your thoughts on the FR/PR? |
@fatpat thanks, this looks interesting. Do we really want to combine the fact that the replica is hidden from the fact it can't be promoted? Not sure if use cases for that exist and justify it, but at least in theory this could be done with a dedicated flag not to impose this limitation. Will still be happy to get more user feedback, @hwware any thoughts about this? |
@yossigo I would also vote for a separate flags for the hidden replicas, this will make the config to be more specific. for the relationship of hidden replica which cannot be promoted, we can wait for more use cases on this. However, even this fact is true, we can still check in sentinelSelectSlave to exclude replicas with this flag. |
@fatpat Does the above make sense to you? |
yes it makes sense to me. How would you name this flag ?
I would prefer |
@fatpat to me |
replaced by #8653 |
The
sentinel replicas <master>
command will not expose replicas with a priority of -1.As with a value of 0, the replica is marked as not able to perform the role of master.
The goal of adding a value (
-1
) to the config settingreplica-priority
is to allow ghost replicas. The replica is in the cluster, synchronize with its master, can never be promoted to master and is not exposed to sentinel clients. This way, it is acting as alive backup
orliving ghost
.The initial use case was the following:
-1
value toreplica-priority
this code is running in production on a 6.0.10 cluster and we are happy with it.