This repository was archived by the owner on Jan 22, 2022. It is now read-only.

Description
Hey friends! Long time user of this gem and we recently had to move our redis sentinel setup over to redis cluster. Since redis-rb has no support for redis cluster, we ended up using corvus to proxy between redis-rb and redis cluster. In the past :raise_errors has been great for preventing requests from failing during a redis blip, but now that we're using a proxy, we get a new Redis::CommandError of ERR Proxy error from corvus if redis cluster is down. If you're open to allowing me to adding support for this problem in this gem, I think 1 of the 2 approaches would work:
- Rescue
Redis::CommandErrors and only raise if :raise_errors is disabled. This is an easy change but has negative side effects since a Redis::CommandError is something that should probably not be swallowed.
- Add a whitelist of
Redis::CommandErrors that can safely be ignored as an argument. By default, no errors are ignored, but you could do something like:
{ :raise_errors => false, :ignored_command_errors => ["ERR Proxy error"] }
Of the two options, I think (2) is far more maintainable. I have a branch for (2) ready to open as a PR, but I wanted to check to see if this is something you'd be interested in accepting. Thanks!