30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/aerospike/node/refresh/info.rb', line 30
def call(node, peers)
conn = node.tend_connection
if peers.use_peers?
cmds = node.cluster.rack_aware ? CMDS_REBALANCE : CMDS_PEERS
info_map = ::Aerospike::Info.request(conn, *cmds)
Verify::PeersGeneration.(node, info_map, peers)
Verify::PartitionGeneration.(node, info_map)
Verify::RebalanceGeneration.(node, info_map) if node.cluster.rack_aware
Verify::Name.(node, info_map)
Verify::ClusterName.(node, info_map)
else
info_map = ::Aerospike::Info.request(conn, *CMDS_SERVICES)
Verify::PartitionGeneration.(node, info_map)
Verify::Name.(node, info_map)
Verify::ClusterName.(node, info_map)
Refresh::Friends.(node, peers, info_map)
end
node.restore_health
node.responded!
peers.refresh_count += 1
node.reset_failures!
rescue ::Aerospike::Exceptions::Aerospike => e
conn.close if conn
node.decrease_health
peers.generation_changed = true if peers.use_peers?
Refresh::Failed.(node, e)
end
|