Comments (12)
@marclennox any chance you're using redis-namespace
?
I think the changes in v7.1.26 (namely #728) introduce a conflict with namespacing.
In v7.1.25, with no lock_timeout
config set, when Locksmith#primed_async
calls pop_queued
, the wait
was nil
, so then pop_queued
called rpoplpush
.
In v7.1.26, pop_queued
likely gets a timeout
of 1 in the default scenario, thus triggering brpoplpush
, which has a keyword argument, but I don't think redis-namespace
properly handles it, which then leads to an error in the redis call, which seems to surface as the job conflicting with itself in this gem.
I didn't go terribly far down this rabbit hole, was only using namespacing in development, so ended up pulling it out completely, and that fixed things with v7.1.26. Jobs then ran fine in development and so far have run fine in production.
from sidekiq-unique-jobs.
For me it is working fine:
worker | 2022-07-29T17:24:22.311Z pid=18000 tid=4s0 class=SlackNotifier jid=9ce8251c85717423e58aeb6d INFO: start
worker | 2022-07-29T17:24:22.326Z pid=18000 tid=4s0 class=SlackNotifier jid=9ce8251c85717423e58aeb6d elapsed=0.014 INFO: done
from sidekiq-unique-jobs.
Could you share some information about your setup @marclennox?
from sidekiq-unique-jobs.
I'll provide more detail when I get back to this, but my jobs defined as follows are not running in the newer version, but fine in the previous.
sidekiq_options lock: :until_and_while_executing,
on_conflict: {
client: :log,
server: :reject
}
from sidekiq-unique-jobs.
They are all just going to the Dead queue
from sidekiq-unique-jobs.
Thanks for that, I'll try and replicate it in a local project!
from sidekiq-unique-jobs.
Uff, redis-namespace strikes again... I can replicate the problem locally but fixing it I'm not even sure it is possible.
from sidekiq-unique-jobs.
This is the error message: Hash can't be coerced into Float
It seems like redis-namespace
isn't compatible with newer redis versions. The redis-namespace uses the old version which took a float. Newer redis versions removed that argument:
def brpoplpush(source, destination, deprecated_timeout = 0, timeout: deprecated_timeout)
I don't want to use deprecated values if I can avoid it
from sidekiq-unique-jobs.
@cgunther @marclennox see if resque/redis-namespace#204 will be taken care of. There isn't that much I can do more than that.
from sidekiq-unique-jobs.
@marclennox any chance you're using
redis-namespace
?I think the changes in v7.1.26 (namely #728) introduce a conflict with namespacing.
In v7.1.25, with no
lock_timeout
config set, whenLocksmith#primed_async
callspop_queued
, thewait
wasnil
, so thenpop_queued
calledrpoplpush
.In v7.1.26,
pop_queued
likely gets atimeout
of 1 in the default scenario, thus triggeringbrpoplpush
, which has a keyword argument, but I don't thinkredis-namespace
properly handles it, which then leads to an error in the redis call, which seems to surface as the job conflicting with itself in this gem.I didn't go terribly far down this rabbit hole, was only using namespacing in development, so ended up pulling it out completely, and that fixed things with v7.1.26. Jobs then ran fine in development and so far have run fine in production.
Indeed I'm using redis namespace. So I should abandon this to get around the problem?
from sidekiq-unique-jobs.
Mike Perham recommends strongly against redis namespace so I have come to work around it.
I'll see if I can fix it but given the type of error; I wonder how many other hidden errors are because of keyword arguments and redis namespace.
from sidekiq-unique-jobs.
Released as https://github.com/mhenrixon/sidekiq-unique-jobs/releases/tag/v7.1.27
from sidekiq-unique-jobs.
Related Issues (20)
- concurrent-ruby has dropped support for TimerTask timeouts HOT 1
- concurrent-ruby 1.1.10 spikes volume of jobs HOT 8
- Ambiguity about `death_handers`
- DEPRECATION WARNING: default_worker_options is deprecated and will be removed from Sidekiq 7.0 (use default_job_options instead) (called from notify_agents at /Users/hackeron/Development/Tether/timeline/app/models/user.rb:303) HOT 3
- Reviwing: Failed jobs waiting to be retried are not considered when fetching uniqueness
- Unexpected behavior with until_and_while_executing HOT 4
- Disable logging in Rails testing HOT 7
- spammed by `Nothing to delete; exiting` during spec HOT 2
- Jobs are being allowed to run even though there is a lock HOT 8
- Locks can't be found in UI? HOT 5
- Incompatibility with Sidekiq 7 HOT 12
- Job executed twice when reaper runs
- Error "undefined method `redis_info' for Sidekiq:Module" on upgrade HOT 2
- Using rspec matcher and getting: `NameError: uninitialized constant SidekiqUniqueJobs::Lock::BaseLock::Validator`
- until and while executing with different arguments for client/server HOT 2
- Got often got Limit exceeded message in changelog HOT 6
- Unlock jobs when queue is deleted HOT 2
- Allow one running job but at most one job in the queue HOT 2
- while_executing jobs being dropped HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sidekiq-unique-jobs.