Skip to content

Cluster mode KEYS only searches one node by default #2560

Open
@Kyle-sandeman-mrdfood

Description

@Kyle-sandeman-mrdfood

"KEYS",

The documentation provides an example: rc.keys(target_nodes=Redis.ALL_NODES). This looks acceptable as a default to me.
The KEYS command does not make sense in a cluster environment without checking at least the Redis.PRIMARIES.

Could KEYS either be moved to PRIMARIES/ALL_NODES or a note be added to the Clustering section of the documentation which explains this behaviour?

In redis-py-cluster, this command was given the flag all-nodes: https://github.com/Grokzen/redis-py-cluster/blob/8a8102a9d758d61a7ec1e2ac9050fcd34029ff3f/rediscluster/client.py#L183

As such rc.keys("...") breaks after switching to redis-py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions