Skip to content

Add Sentinel +switch-master linstener option to monitor failovers.#3915

Open
ManelCoutinhoSensei wants to merge 1 commit intoredis:masterfrom
ManelCoutinhoSensei:sentinel-switch-master
Open

Add Sentinel +switch-master linstener option to monitor failovers.#3915
ManelCoutinhoSensei wants to merge 1 commit intoredis:masterfrom
ManelCoutinhoSensei:sentinel-switch-master

Conversation

@ManelCoutinhoSensei
Copy link
Contributor

Description of change

Fix for #3867 inspired by the redis-go library.
This solution adds a thread that cycles through valid sentinel clients to listen for +switch-master events whenever a failover happens and the user decided to monitor it.

It also provides a first step to implement a solution for #3543.

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

@jit-ci
Copy link

jit-ci bot commented Jan 19, 2026

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

@petyaslavova
Copy link
Collaborator

Hi @ManelCoutinhoSensei, thank you for your contribution! We will have a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants