Skip to content

create_redis_pool_with_nodes can't build Sentinel/Cluster pools #1184

Description

@abdulwaarith0

create_redis_pool_with_nodes in modules/matchmaking/redis.rs is meant to build a pool for Sentinel and Cluster topologies, but it can't with the current dependency setup, so the two tests that assert it works fail.

For cluster mode it builds a redis+cluster://… URL and for the non-cluster (sentinel) path a redis+sentinel://… URL, then hands that to deadpool_redis::Config::from_url(...).create_pool(...). deadpool-redis 0.14 without the cluster feature doesn't recognise those schemes, so create_pool returns Err for both. The function also treats "not cluster" as "sentinel", which isn't right either: a plain standalone caller with cluster_mode = false would be pushed onto the sentinel scheme.

Because of this, test_create_redis_pool_with_nodes_cluster and test_create_redis_pool_with_nodes_sentinel fail. Their assertions describe the intended behaviour correctly, so in #1182 I marked both #[ignore] with a pointer back here rather than rewriting them to expect the broken result. This issue tracks making them pass for real.

What's likely needed:

  • Enable the cluster feature on deadpool-redis (and pull in cluster support in redis) so redis+cluster:// parses, then confirm the cluster pool path actually builds.
  • Decide how Sentinel should be configured. deadpool-redis doesn't drive Sentinel the way it does Cluster, so this may need the redis crate's Sentinel client rather than a URL scheme, or a different pool construction entirely.
  • Separate the "standalone with explicit nodes" case from the "sentinel" case, so cluster_mode = false doesn't silently force a sentinel URL.
  • Un-ignore the two tests in modules/matchmaking/redis.rs once the paths work, and add coverage for the standalone-with-nodes case.

I'm happy to take this on as a follow-up if you'd like, but it touches dependency features and the intended Sentinel/Cluster deployment model, so it seemed better to confirm the direction with you first rather than fold it into the CI fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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