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

redis-clustering: NoMethodError: undefined method `node_keys' for nil:NilClass #1282

Closed
ccutrer opened this issue Jun 3, 2024 · 1 comment · Fixed by #1283
Closed

redis-clustering: NoMethodError: undefined method `node_keys' for nil:NilClass #1282

ccutrer opened this issue Jun 3, 2024 · 1 comment · Fixed by #1283

Comments

@ccutrer
Copy link

ccutrer commented Jun 3, 2024

With a recent redis-cluster-client commit, @router can be nil, so https://github.com/redis/redis-rb/blob/v5.2.0/cluster/lib/redis/cluster/client.rb#L56 is failing.

#<NoMethodError: undefined method `node_keys' for nil:NilClass

        @router.node_keys.join(' ')
               ^^^^^^^^^^>
/var/web/canvas/shared/bundle/ruby/3.1.0/gems/redis-clustering-5.2.0/lib/redis/cluster/client.rb:56:in `id'
/var/web/canvas/shared/bundle/ruby/3.1.0/gems/redis-5.2.0/lib/redis.rb:111:in `id'
/var/web/canvas/shared/bundle/ruby/3.1.0/gems/redis-5.2.0/lib/redis.rb:115:in `inspect'
(irb):8:in `<top (required)>'

is a full backtrace.

Note that in redis-cluster-client's inspect method, it checks if @router is nil before using it now.

@supercaracal
Copy link
Contributor

Sorry, I'll fix it ASAP.

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 a pull request may close this issue.

2 participants