Hello!
I have been collaborated with Jedis, and I'm interested in Sentinel.
While commenting to issue, I'm suddenly wondered about how we retrieve master with Sentinels with network partitioned.
My scenario starts at 3 Sentinels (A, B, C) and Redis Server (M, S).
A. Sentinels A, B, C monitors Redis Server with M/S replication, and also Client monitors 3 Sentinels by subscribing "+switch-master".
B. Suddenly network partition occurred -> Sentinels B, C + Redis M/S, Client / Sentinel A.
Sentinel A suddenly can't connect.
C. Redis Master Server suddenly shut down. B, C Sentinels agree to failover and changes their master.
(Sentinel A cannot know that)
D. Client changes master based on "+switch-master" message.
E. Network partition is resolved, so Sentinel A is now reachable.
F. Client talks to Sentinel A who is master.
I have two questions about this scenario.
1. When F occurred, is there no probability to respond M is master? Is there no timing issue?
2. Can Client always get current master to any Sentinel correctly? (IDONTKNOW is surely OK.)
Or is there a information about current Sentinel's epoch?
Actually scenario could be applied to Sentinel A suddenly shut down and revive.
Please leave an answer so that I can think deeply on Sentinel support.
Thanks!