Skip to content

Commit 39b0562

Browse files
authored
Fixes initial topology
With a single-node cluster, this fixes a failure whereby the client attempts to issue a READONLY command to the sole master. This returns an unknown command error with Redis Enterprise Cloud.
1 parent c64cd23 commit 39b0562

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redis_client/cluster/node/base_topology.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def disconnect_from_unwanted_nodes(options)
5454
def connect_to_new_nodes(options)
5555
(options.keys - @clients.keys).each do |node_key|
5656
option = options[node_key].merge(@client_options)
57-
config = ::RedisClient::Cluster::Node::Config.new(scale_read: !@primary_node_keys.include?(node_key), **option)
57+
config = ::RedisClient::Cluster::Node::Config.new(scale_read: @replica_node_keys.include?(node_key), **option)
5858
client = @pool.nil? ? config.new_client : config.new_pool(**@pool)
5959
@clients[node_key] = client
6060
end

0 commit comments

Comments
 (0)