You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
Version: What redis-py and what redis version is the issue happening on?
redis-py: 5.0.0
redis: 6.2.0 Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
python3.11 on Ubuntu Description: Description of your issue, stack traces from errors and code that reproduces the issue
This is how Redis works:
>> SET a 2
"OK"
>> WATCH a
"OK"
>> SET a 3
"OK"
>> MULTI
"OK"
>> SET a 4
"QUEUED"
>> EXEC
(nil)
>> GET a
"3"
As expected.
This is how redis-py works:
In [19]: await redis.set("a", 1)
...: await redis.watch("a")
...: a = await redis.get("a")
...: await redis.set("a", 2)
...: async with redis.pipeline() as pipeline:
...: pipeline.multi()
...: await pipeline.set("a", 3)
...: await pipeline.execute()
...:
In [20]: await redis.get("a")
Out[20]: '3'
It will work however if we add WATCH to the pipeline.
But I don't want to create a pipeline when getting the value, because I won't always update the value.
The text was updated successfully, but these errors were encountered:
Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
Version: What redis-py and what redis version is the issue happening on?
redis-py: 5.0.0
redis: 6.2.0
Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
python3.11 on Ubuntu
Description: Description of your issue, stack traces from errors and code that reproduces the issue
This is how Redis works:
As expected.
This is how
redis-py
works:It will work however if we add
WATCH
to the pipeline.But I don't want to create a pipeline when getting the value, because I won't always update the value.
The text was updated successfully, but these errors were encountered: