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#exists(key) Warning from redis 4.2.0 #4591

Closed
nbibler opened this issue Jun 9, 2020 · 15 comments
Closed

Redis#exists(key) Warning from redis 4.2.0 #4591

nbibler opened this issue Jun 9, 2020 · 15 comments

Comments

@nbibler
Copy link

nbibler commented Jun 9, 2020

Ruby version: 2.x
Sidekiq / Pro / Enterprise version(s): 6.0.7

Probably mostly a redis gem issue more than sidekiq, but the latest release today (4.2.0) introduces a warning message:

Redis#exists(key)` will return an Integer in redis-rb 4.3, if you want to keep the old behavior, use `exists?` instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer = true. (gems/sidekiq-6.0.7/lib/sidekiq/launcher.rb:160:in `block (2 levels) in ❤')

This message gets repeated endlessly in the sidekiq log files.

It looks as though sidekiq should be using exists? rather than exists, if I'm reading their messaging correctly.

@mperham mperham closed this as completed in 6a33404 Jun 9, 2020
@mperham
Copy link
Collaborator

mperham commented Jun 9, 2020

I plan on releasing Sidekiq 6.1 later this month. I don't want to pick up a minor version bump like this so quick after release; we'll let it sit for a few weeks to let their changes stabilize.

@nbibler
Copy link
Author

nbibler commented Jun 10, 2020

Waiting to release seems fine to me. It's certainly non-critical.

I'm not sure exactly how I feel about this change on the redis gem, really. It seems noisy, to the say the least. Coupled with the proposed 4.3.0 change from returning a boolean to an integer would be breaking (since 0 is truthy in Ruby, that is). Arguably, that shouldn't be suitable for a minor update to the 4 series. But not a problem for here!

Anyway, thank you for the response and the fix!

@fwininger
Copy link

Any update on this ?

@gauravmc
Copy link

gauravmc commented Jul 7, 2020

For now you can update your redis gem to 4.2.1, and add Redis.exists_returns_integer = false in your code (for e.g., in config/application.rb if you're using Rails) to silence the endlessly repeating warning. Check redis/redis-rb#920 for more details.

@koenpunt
Copy link

koenpunt commented Jul 7, 2020

@gauravmc Sidekiq 6.1 has been released so I think you can just use that.

@stevepetersen
Copy link

I'm on sidekiq (6.1.0) and Redis (4.2.1) and still seeing this log message

@jgomo3
Copy link

jgomo3 commented Jul 31, 2020

I upgraded sidekiq to 6.1.1 and I'm not receiving the message any more.

@quangtt
Copy link

quangtt commented Aug 4, 2020

I'm on Sidekiq (6.1.1) and Redis (4.2.1) and still seeing this log message.

Passing 'exists?' command to redis as is; blind passthrough has been deprecated and will be removed in redis-namespace 2.0 (at /usr/local/bundle/gems/sidekiq-6.1.1/lib/sidekiq/launcher.rb:161:in `block (2 levels) in ❤')

@acooxy
Copy link

acooxy commented Aug 12, 2020

I'm on Sidekiq (6.1.1) and Redis (4.2.1) and still seeing this log message.

Passing 'exists?' command to redis as is; blind passthrough has been deprecated and will be removed in redis-namespace 2.0 (at /usr/local/bundle/gems/sidekiq-6.1.1/lib/sidekiq/launcher.rb:161:in `block (2 levels) in ❤')

You can use nano, vim or vs code to open file and comment line 161
code /Users/mymacbook/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/sidekiq-6.1.1/lib/sidekiq/launcher.rb
and comment line 161 # conn.exists?(key)

@mperham
Copy link
Collaborator

mperham commented Aug 12, 2020

@acooxy this is the worst possible advice. You are telling people to comment out lines of code which are there for a reason. Sidekiq will break in unpredictable ways.

@acooxy
Copy link

acooxy commented Aug 12, 2020

@acooxy this is the worst possible advice. You are telling people to comment out lines of code that are there for a reason. Sidekiq will break in unpredictable ways.

sharing what worked for me, so far everything works fine, however,@mperham we will follow your lead on the solution you will bring

@mperham
Copy link
Collaborator

mperham commented Aug 12, 2020

The fix is to get a new version of the redis-namespace gem or stop using it. This issue is not in Sidekiq.

@mperham
Copy link
Collaborator

mperham commented Aug 13, 2020

resque/redis-namespace#171

@acooxy
Copy link

acooxy commented Aug 13, 2020

resque/redis-namespace#171
Ok, thanks

@chrisgeek
Copy link

Upgrading sidekiq to 6.1.1 resolved the problem for me, Redis is 4.0.11

@sidekiq sidekiq locked as resolved and limited conversation to collaborators Oct 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants