redis/redis-py · error · RedisClusterException

shard_hint is deprecated in cluster mode

Error message

shard_hint is deprecated in cluster mode

What it means

Error "shard_hint is deprecated in cluster mode" thrown in redis/redis-py.

Source

Thrown at redis/cluster.py:1235

        from redis.keyspace_notifications import ClusterKeyspaceNotifications

        return ClusterKeyspaceNotifications(
            self,
            key_prefix=key_prefix,
            ignore_subscribe_messages=ignore_subscribe_messages,
        )

    def pipeline(self, transaction=None, shard_hint=None):
        """
        Cluster impl:
            Pipelines do not work in cluster mode the same way they
            do in normal mode. Create a clone of this object so
            that simulating pipelines will work correctly. Each
            command will be called directly when used and
            when calling execute() will only return the result stack.
        """
        if shard_hint:
            raise RedisClusterException("shard_hint is deprecated in cluster mode")

        return ClusterPipeline(
            nodes_manager=self.nodes_manager,
            commands_parser=self.commands_parser,
            startup_nodes=self.nodes_manager.startup_nodes,
            result_callbacks=self.result_callbacks,
            cluster_response_callbacks=self.cluster_response_callbacks,
            read_from_replicas=self.read_from_replicas,
            load_balancing_strategy=self.load_balancing_strategy,
            reinitialize_steps=self.reinitialize_steps,
            retry=self.retry,
            lock=self._lock,
            transaction=transaction,
            event_dispatcher=self._event_dispatcher,
        )

    def lock(
        self,

View on GitHub (pinned to da03cdc7e8)

When it happens

Trigger: Thrown at redis/cluster.py:1235 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of redis/redis-py@da03cdc7e8 (2026-08-04). Data as JSON: /data/errors/3981565cd82aee25.json. Report an issue: GitHub.