class Redis::Cluster
def _scan(command, &block)
def _scan(command, &block) input_cursor = Integer(command[1]) client_index = input_cursor % 256 raw_cursor = input_cursor >> 8 clients = @node.scale_reading_clients client = clients[client_index] return ['0', []] unless client command[1] = raw_cursor.to_s result_cursor, result_keys = client.call(command, &block) result_cursor = Integer(result_cursor) if result_cursor == 0 client_index += 1 end [((result_cursor << 8) + client_index).to_s, result_keys] end