lib/aerospike/cluster/cluster.rb in aerospike-1.0.9 vs lib/aerospike/cluster/cluster.rb in aerospike-1.0.10

- old
+ new

@@ -236,19 +236,18 @@ # Handle nodes changes determined from refreshes. # Remove nodes in a batch. remove_list = find_nodes_to_remove(refresh_count) remove_nodes(remove_list) unless remove_list.empty? - Aerospike.logger.info("Tend finished. Live node count: #{nodes.length}") + Aerospike.logger.info("Tend finished. Live node count: #{nodes.length} #{nodes}") end def wait_till_stablized count = -1 # will run until the cluster is stablized thr = Thread.new do - abort_on_exception=true while true tend # Check to see if cluster has changed since the last Tend. # If not, assume cluster has stabilized and return. @@ -443,22 +442,11 @@ end def find_node_in_partition_map(filter) partitions_list = partitions - partitions_list.each do |node_array| - max = node_array.length - - i = 0 - while i < max - node = node_array[i] - # Use reference equality for performance. - if node == filter - return true - end - - i = i.succ - end + partitions_list.values.each do |node_array| + return true if node_array.value.any? { |node| node == filter } end false end def add_nodes(nodes_to_add)