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.
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.
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!
Any update on this ?
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 https://github.com/redis/redis-rb/pull/920 for more details.
@gauravmc Sidekiq 6.1 has been released so I think you can just use that.
I'm on sidekiq (6.1.0) and Redis (4.2.1) and still seeing this log message
I upgraded sidekiq to 6.1.1 and I'm not receiving the message any more.
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 ❤')
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)
@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 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
The fix is to get a new version of the redis-namespace gem or stop using it. This issue is not in Sidekiq.
resque/redis-namespace#171
Ok, thanks
Upgrading sidekiq to 6.1.1 resolved the problem for me, Redis is 4.0.11
Most helpful comment
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.