Module: Aerospike::Node::Verify::PartitionGeneration
- Defined in:
- lib/aerospike/node/verify/partition_generation.rb
Overview
Fetch and set partition generation. If partitions needs to be refreshed this will be indicated in node.partition_changed
Class Method Summary collapse
Class Method Details
.call(node, info_map) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/aerospike/node/verify/partition_generation.rb', line 27 def call(node, info_map) gen_string = info_map.fetch('partition-generation', nil) raise Aerospike::Exceptions::Parse.new('partition-generation is empty', [node]) if gen_string.to_s.empty? generation = gen_string.to_i node.partition_generation.update(generation) return unless node.partition_generation.changed? Aerospike.logger.info("Node #{node.name} partition generation #{generation} changed") end |