Predis\Connection\Cluster\RedisCluster::queryClusterNodeForSlotMap PHP Метод

queryClusterNodeForSlotMap() приватный Метод

When the connection fails, this method tries to execute the same command on a different connection picked at random from the pool of known nodes, up until the retry limit is reached.
private queryClusterNodeForSlotMap ( Predis\Connection\NodeConnectionInterface $connection ) : mixed
$connection Predis\Connection\NodeConnectionInterface Connection to a node of the cluster.
Результат mixed
    private function queryClusterNodeForSlotMap(NodeConnectionInterface $connection)
    {
        $retries = 0;
        $command = RawCommand::create('CLUSTER', 'SLOTS');
        RETRY_COMMAND:
        try {
            $response = $connection->executeCommand($command);
        } catch (ConnectionException $exception) {
            $connection = $exception->getConnection();
            $connection->disconnect();
            $this->remove($connection);
            if ($retries === $this->retryLimit) {
                throw $exception;
            }
            if (!($connection = $this->getRandomConnection())) {
                throw new ClientException('No connections left in the pool for `CLUSTER SLOTS`');
            }
            ++$retries;
            goto RETRY_COMMAND;
        }
        return $response;
    }