{"id":"3981565cd82aee25","repo":"redis/redis-py","slug":"shard-hint-is-deprecated-in-cluster-mode-398156","errorCode":null,"errorMessage":"shard_hint is deprecated in cluster mode","messagePattern":"shard_hint is deprecated in cluster mode","errorType":"exception","errorClass":"RedisClusterException","httpStatus":null,"severity":"error","filePath":"redis/cluster.py","lineNumber":1235,"sourceCode":"        from redis.keyspace_notifications import ClusterKeyspaceNotifications\n\n        return ClusterKeyspaceNotifications(\n            self,\n            key_prefix=key_prefix,\n            ignore_subscribe_messages=ignore_subscribe_messages,\n        )\n\n    def pipeline(self, transaction=None, shard_hint=None):\n        \"\"\"\n        Cluster impl:\n            Pipelines do not work in cluster mode the same way they\n            do in normal mode. Create a clone of this object so\n            that simulating pipelines will work correctly. Each\n            command will be called directly when used and\n            when calling execute() will only return the result stack.\n        \"\"\"\n        if shard_hint:\n            raise RedisClusterException(\"shard_hint is deprecated in cluster mode\")\n\n        return ClusterPipeline(\n            nodes_manager=self.nodes_manager,\n            commands_parser=self.commands_parser,\n            startup_nodes=self.nodes_manager.startup_nodes,\n            result_callbacks=self.result_callbacks,\n            cluster_response_callbacks=self.cluster_response_callbacks,\n            read_from_replicas=self.read_from_replicas,\n            load_balancing_strategy=self.load_balancing_strategy,\n            reinitialize_steps=self.reinitialize_steps,\n            retry=self.retry,\n            lock=self._lock,\n            transaction=transaction,\n            event_dispatcher=self._event_dispatcher,\n        )\n\n    def lock(\n        self,","sourceCodeStart":1217,"sourceCodeEnd":1253,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/cluster.py#L1217-L1253","documentation":"Error \"shard_hint is deprecated in cluster mode\" thrown in redis/redis-py.","triggerScenarios":"Thrown at redis/cluster.py:1235 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"da03cdc7e8731092b13e395605c3c1fb2de25de1","analyzedAt":"2026-08-04T20:26:47.563Z","schemaVersion":2}