I am running into an issue where I am using library /etaty/rediscala (which is no longer maintained) to talk to the sentinel monitored redis client. However, during master failover, the sentinel is informed about it through a pub/sub model which does not guarantee delivery of the message so at times we end up with an error :
READONLY You can't write against a read only slave., trace:-
redis.actors.RedisReplyDecoder.$anonfun$decodeRedisReply$1(RedisReplyDecoder.scala:68)
redis.actors.RedisReplyDecoder.$anonfun$decodeRedisReply$1$adapted(RedisReplyDecoder.scala:67)
redis.protocol.DecodeResult.foreach(RedisProtocolReply.scala:89)
redis.protocol.DecodeResult.foreach$(RedisProtocolReply.scala:87)
I am trying to find a way on how can I determine the new master in this case. I am hoping to reconnect to the sentinel in a hope that if the message was lost when sentinel tried to inform the redisclient, it would get the most recent redis master and would be able to connect.
I believe it should work as when I see this error and I restart my cluster it works, so sentinel has the information about new master but failed to send it to the client. This client library is no longer maintained and is bit complicated. Has anyone else using this library encountered this error before?