25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/aerospike/node/verify/name.rb', line 25
def call(node, info_map)
info_name = info_map['node']
unless info_name
node.decrease_health
raise Aerospike::Exceptions::Aerospike.new(Aerospike::ResultCode::INVALID_NODE_ERROR, 'Node name is empty', [node])
end
unless node.name == info_name
node.inactive!
raise Aerospike::Exceptions::Aerospike.new(Aerospike::ResultCode::INVALID_NODE_ERROR, "Node name has changed. Old=#{node.name} New= #{info_name}", [node])
end
end
|