Skip to content

execute_command() behaves strangely in cluster mode #2095

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

Closed
suxb201 opened this issue Apr 7, 2022 · 3 comments
Closed

execute_command() behaves strangely in cluster mode #2095

suxb201 opened this issue Apr 7, 2022 · 3 comments

Comments

@suxb201
Copy link
Contributor

suxb201 commented Apr 7, 2022

Version: redis==4.2.2
Platform: MacOS with python==3.10
Description: execute_command behaves strangely in cluster mode.

run no-key command:

# works fine
rc.cluster_info()
rc.execute_command("CLUSTER INFO")

# RedisClusterException: No way to dispatch this command to Redis Cluster. Missing key.
rc.execute_command("CLUSTER", "INFO")
rc.execute_command("cluster info")
rc.execute_command("cluster", "info")
@suxb201 suxb201 changed the title execute_command behaves strangely in cluster mode execute_command() behaves strangely in cluster mode Apr 7, 2022
@chayim
Copy link
Contributor

chayim commented Apr 14, 2022

Hi @suxb201 have you tried using the commands directly, for the cluster interface rather than execute command? While perhaps there's improvement for raw commands we can do here (clearly!), at least this should get you over your hump.

@suxb201
Copy link
Contributor Author

suxb201 commented Apr 18, 2022

We have some scenarios where we use string concatenation commands, so execute_command() is the best choice.

@suxb201
Copy link
Contributor Author

suxb201 commented Apr 28, 2022

Thanks to @chayim and @dvora-h , the problem has been solved in #2097.

@suxb201 suxb201 closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants