-
Notifications
You must be signed in to change notification settings - Fork 191
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
ERR MULTI calls can not be nested after upgrade to redis 4.6.0 #191
Comments
Here is a script that can help pinpoint the issue. Maybe something is wrong with the following code when running in threads and redis-namespace/lib/redis/namespace.rb Line 525 in 7e43f2d
|
casperisfine
pushed a commit
to casperisfine/redis-namespace
that referenced
this issue
Mar 7, 2022
Fix: resque#191 Fix: redis/redis-rb#1069 In redis-rb 4.6.0, the object yielded by `multi` and `pipelined` is an unsynchronized `PipelinedConnection` object. This changed opened a thread safety issue in Redis::Namespace: - T1: `redis.multi do`, sets `Namespace#redis = PipelinedConnection` - T2: any command called before T1 exists the `multi` block is called on the pipelined connection
casperisfine
pushed a commit
to casperisfine/redis-namespace
that referenced
this issue
Mar 7, 2022
Fix: resque#191 Fix: redis/redis-rb#1088 In redis-rb 4.6.0, the object yielded by `multi` and `pipelined` is an unsynchronized `PipelinedConnection` object. This changed opened a thread safety issue in Redis::Namespace: - T1: `redis.multi do`, sets `Namespace#redis = PipelinedConnection` - T2: any command called before T1 exists the `multi` block is called on the pipelined connection
casperisfine
pushed a commit
to casperisfine/redis-namespace
that referenced
this issue
Mar 7, 2022
Fix: resque#191 Fix: redis/redis-rb#1088 In redis-rb 4.6.0, the object yielded by `multi` and `pipelined` is an unsynchronized `PipelinedConnection` object. This changed opened a thread safety issue in Redis::Namespace: - T1: `redis.multi do`, sets `Namespace#redis = PipelinedConnection` - T2: any command called before T1 exists the `multi` block is called on the pipelined connection
casperisfine
pushed a commit
to casperisfine/redis-namespace
that referenced
this issue
Mar 7, 2022
Fix: resque#191 Fix: redis/redis-rb#1088 In redis-rb 4.6.0, the object yielded by `multi` and `pipelined` is an unsynchronized `PipelinedConnection` object. This changed opened a thread safety issue in Redis::Namespace: - T1: `redis.multi do`, sets `Namespace#redis = PipelinedConnection` - T2: any command called before T1 exists the `multi` block is called on the pipelined connection
casperisfine
pushed a commit
to casperisfine/redis-namespace
that referenced
this issue
Mar 7, 2022
Fix: resque#191 Fix: redis/redis-rb#1088 In redis-rb 4.6.0, the object yielded by `multi` and `pipelined` is an unsynchronized `PipelinedConnection` object. This changed opened a thread safety issue in Redis::Namespace: - T1: `redis.multi do`, sets `Namespace#redis = PipelinedConnection` - T2: any command called before T1 exists the `multi` block is called on the pipelined connection
The issue has been solved by this PR: #192 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use redis-namespace 1.8.1.
I upgraded redis gem from 4.5.1 to 4.6.0 and I noticed errors from time to time in our Sidekiq workers.
I believe this is related to recent changes in redis gem regarding
multi
method:https://github.com/redis/redis-rb/blob/master/CHANGELOG.md#460
Deprecate calling commands on Redis inside Redis#multi.
should be replaced by:
Here is how to reproduce the error.
Then run in bash this
It will keep running the script until it fails.
Here the line in redis-namespace. Maybe it somehow wrongly use redis gem after the latest changes for
multi
( redis/redis-rb#1059 )?related issue in redis gem repo
I reported the issue also in redis gem redis/redis-rb#1069 (comment) but we found out that it happens only when using redis-namespace gem.
The text was updated successfully, but these errors were encountered: