Skip to content
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

RedisCluster doesn't support dbs other than 0? #2450

Closed
jarrington-supernatural opened this issue Nov 9, 2022 · 5 comments
Closed

RedisCluster doesn't support dbs other than 0? #2450

jarrington-supernatural opened this issue Nov 9, 2022 · 5 comments
Assignees
Labels
maintenance Maintenance (CI, Releases, etc) Stale

Comments

@jarrington-supernatural
Copy link

Version: What redis-py and what redis version is the issue happening on?
4.3.4 and 4.4.0rc3

Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
Python 3.9, WSL2 Ubuntu

Description: Description of your issue, stack traces from errors and code that reproduces the issue
We are migrating from a single redis host to a redis cluster in elasticache. We are already using several dbs in the target instance and want to continue to do so. According to the RedisCluster class, we should be able to use a db other than 0 to connect. See https://github.com/redis/redis-py/blob/v4.4.0rc3/redis/cluster.py#L405-L413

However, actually using any db other than 0 results in an exception. See https://github.com/redis/redis-py/blob/v4.4.0rc3/redis/cluster.py#L512-L516

Is this intentional or am I missing something?

@Ernest0x
Copy link

From https://redis.io/docs/reference/cluster-spec/:

Redis Cluster does not support multiple databases like the standalone version of Redis. We only support database 0; the SELECT command is not allowed.

@jarrington-supernatural
Copy link
Author

In that case, we should update the documentation (especially here) to ensure this doesn't happen again.

@chayim
Copy link
Contributor

chayim commented Nov 17, 2022

@jarrington-supernatural Agreed! Any chance you'd like to help with that?

@chayim chayim added the maintenance Maintenance (CI, Releases, etc) label Nov 17, 2022
@chayim
Copy link
Contributor

chayim commented Nov 29, 2022

@shacharPash Another one... this is in the documentation side.

Copy link
Contributor

This issue is marked stale. It will be closed in 30 days if it is not updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance (CI, Releases, etc) Stale
Projects
None yet
Development

No branches or pull requests

4 participants