Skip to content
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

subscribe never failed when sentinel master switched #583

Closed
aahoughton opened this issue Jun 25, 2017 · 6 comments
Closed

subscribe never failed when sentinel master switched #583

aahoughton opened this issue Jun 25, 2017 · 6 comments
Labels

Comments

@aahoughton
Copy link

aahoughton commented Jun 25, 2017

Looking for thoughts here -- it's possible I'm mis-using a portion of the library. I've got a go program that ties two different redis instances together via pub/sub:

  • Redis A, sentinels, psubscribe for published events
  • Redis B, AWS elasticache, publish transformed events

.. the other day we had a sentinel failover in Redis A; the event count dropped to 0, no events were being published to B, cue disaster music. The particular redis instance we were connected to never died, but no events were being published to it after sentinel failover.

The library may well -- probably did -- receive the +switch-master notification, but that never bubbled up to me, and the existing connection was happy.

How would you handle this case? Is there an intention to bubble sentinel events up to clients in some way?

@vmihailenco
Copy link
Collaborator

What currently happens is that go-redis tries to close free connections to the old master. But PubSub connections are never free and therefore that connection is never closed. I think the proper fix would be to close all connections after master address is changed.

@vmihailenco
Copy link
Collaborator

Sentinel should be fixed in v6.5.1. Keeping this open as reminder to do something similar for Redis Cluster

@vmihailenco vmihailenco reopened this Jun 29, 2017
@aahoughton
Copy link
Author

Somehow I missed this when it occurred -- thank you, 6 months late.

@kjoe
Copy link

kjoe commented Jul 26, 2018

I've similar issue (should I open another?), when Redis Cluster failed beside blocking and non-blocking operations, and some master changes its state:

CLUSTERDOWN The cluster is down
MOVED 5441 x.x.x.x:yyyy

The cluster resurrects, but several connections to the old masters stays established.

@vmihailenco
Copy link
Collaborator

It makes sense to open new issue if you have a small program that reproduces the problem. This issue is about sentinel which is completely different software.

Copy link

This issue is marked stale. It will be closed in 30 days if it is not updated.

@github-actions github-actions bot added the Stale label Jul 11, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants