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
Description: In 4.0.0b1, the implementation of script_flush always calls either SCRIPT FLUSH SYNC or SCRIPT FLUSH ASYNC on the server. However, the SYNC/ASYNC modifier was only added in Redis 6.2, making it fail on older versions.
To reproduce (assuming a Redis server on localhost):
Result: ResponseError: Unknown subcommand or wrong number of arguments for 'FLUSH'. Try SCRIPT HELP.
Apart from wanting to support older Redis versions, the documentation suggests that providing neither modifier is not simply equivalent to providing SYNC. Rather, it leaves it up to a configuration setting on the server, and I feel like calling r.script_flush() should respect that server-side default.
The text was updated successfully, but these errors were encountered:
bmerry
changed the title
4.0.0b1 breaks script_flush` on pre-6.2 server
4.0.0b1 breaks script_flush on pre-6.2 server
Oct 25, 2021
Thank you for reporting @bmerry. The PR you see referenced above looks to fix this. We now default to None, which solves both behaviours. Of note, the server can have a different default set - meaning this is a better implementation. Thank you for catching this! It'll be in 4.0.0b2!
Version: redis-py 4.0.0b1, redis 5.0.7
Platform: Python 3.8.10 on Ubunutu 20.04
Description: In 4.0.0b1, the implementation of
script_flush
always calls eitherSCRIPT FLUSH SYNC
orSCRIPT FLUSH ASYNC
on the server. However, the SYNC/ASYNC modifier was only added in Redis 6.2, making it fail on older versions.To reproduce (assuming a Redis server on localhost):
Result:
ResponseError: Unknown subcommand or wrong number of arguments for 'FLUSH'. Try SCRIPT HELP.
Apart from wanting to support older Redis versions, the documentation suggests that providing neither modifier is not simply equivalent to providing SYNC. Rather, it leaves it up to a configuration setting on the server, and I feel like calling
r.script_flush()
should respect that server-side default.The text was updated successfully, but these errors were encountered: