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

Add NodeMightBeDown to redis client error mapping #1241

Conversation

learoyklinginsmith
Copy link
Contributor

@learoyklinginsmith learoyklinginsmith commented Nov 29, 2023

We've experienced RedisClient::Cluster::NodeMightBeDown errors when scaling in our cluster mode enabled Elasticache clusters. This seems expected, but this error doesn't exist in the error map, so we receive an exception similar to the following:

/var/bundle/ruby/3.1.0/gems/redis-clustering-5.0.8/lib/redis/cluster/client.rb:89:in 'fetch': key not found: RedisClient::Cluster::NodeMightBeDown
Did you mean?  RedisClient::Cluster::ErrorCollection (KeyError)
from /var/bundle/ruby/3.1.0/gems/redis-clustering-5.0.8/lib/redis/cluster/client.rb:89:in `rescue in handle_errors'
from /var/bundle/ruby/3.1.0/gems/redis-clustering-5.0.8/lib/redis/cluster/client.rb:79:in `handle_errors'
from /var/bundle/ruby/3.1.0/gems/redis-clustering-5.0.8/lib/redis/cluster/client.rb:61:in `call_v'
from /var/bundle/ruby/3.1.0/gems/redis-5.0.8/lib/redis.rb:152:in `block in send_command'
from /var/bundle/ruby/3.1.0/gems/redis-5.0.8/lib/redis.rb:151:in `synchronize'
from /var/bundle/ruby/3.1.0/gems/redis-5.0.8/lib/redis.rb:151:in `send_command'
from /var/bundle/ruby/3.1.0/gems/redis-5.0.8/lib/redis/commands/strings.rb:95:in `set'

This adds the NodeMightBeDown error to the error mapping so it can be fetched as expected.

@byroot byroot closed this in c6fa9f4 Nov 29, 2023
@byroot
Copy link
Collaborator

byroot commented Nov 29, 2023

Merged as c6fa9f4

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.

None yet

2 participants