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
Add replica-announced config option #8653
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@redis/core-team your approval is needed for this, as this adds a new configuration option and INFO
field for Sentinel's use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (only looked at the new config and new info field).
My only concern was if we want to "pollute" redis with more features that are only used by sentinel at this point, but considering this is following the footsteps of replica-priority, i suppose that's fine.
LGTM |
just want to put some more thoughts of this feature, we can still aware the replica existance if we see "num-slaves" fields in sentinel masters/master command together with sentinel info-cache, the replica just not "offically announce" it. IMHO this shouldn't cause any issue, but bring benefit for debuging purposes. WDYT @yossigo @oranagra @itamarhaber |
The 'sentinel replicas <master>' command will ignore replicas with replica-announced set to no. The goal of disabling the config setting replica-announced is to allow ghost replicas. The replica is in the cluster, synchronize with its master, can be promoted to master and is not exposed to sentinel clients. This way, it is acting as a live backup or living ghost. In addition, to prevent the replica to be promoted as master, set replica-priority to 0.
54a4576
to
bcea5f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
@hwware I somehow missed your comment, sorry about that. I lean towards maintaining consistency between the number of reported replicas and the number, and if this proves to be a troubleshooting obstacle have a dedicated counter for these replicas. Hope this makes sense. |
Merged, thank you @fatpat! |
The 'sentinel replicas <master>' command will ignore replicas with `replica-announced` set to no. The goal of disabling the config setting replica-announced is to allow ghost replicas. The replica is in the cluster, synchronize with its master, can be promoted to master and is not exposed to sentinel clients. This way, it is acting as a live backup or living ghost. In addition, to prevent the replica to be promoted as master, set replica-priority to 0.
The 'sentinel replicas ' command will ignore replicas with
replica-announced set to no.
The goal of disabling the config setting replica-announced is to allow ghost
replicas. The replica is in the cluster, synchronize with its master, can be
promoted to master and is not exposed to sentinel clients. This way, it is
acting as a live backup or living ghost.
In addition, to prevent the replica to be promoted as master, set
replica-priority to 0.
The initial use case was the following:
This PR replace #8437