YUKI Hiroshi
null+****@clear*****
Fri Dec 26 13:08:41 JST 2014
YUKI Hiroshi 2014-12-26 13:08:41 +0900 (Fri, 26 Dec 2014) New Revision: e4e8b4f3066cb169d750f5b0b98bed3507dc2483 https://github.com/droonga/droonga-engine/commit/e4e8b4f3066cb169d750f5b0b98bed3507dc2483 Message: Move orphan method from engine state to clsuter state Modified files: lib/droonga/cluster_state.rb lib/droonga/engine_state.rb Modified: lib/droonga/cluster_state.rb (+12 -0) =================================================================== --- lib/droonga/cluster_state.rb 2014-12-26 12:00:55 +0900 (ea471ff) +++ lib/droonga/cluster_state.rb 2014-12-26 13:08:41 +0900 (efe61fe) @@ -95,6 +95,18 @@ module Droonga end end + def unwritable_node?(node_name) + case node_metadata.role + when NodeMetadata::Role::SERVICE_PROVIDER + absorb_source_nodes.include?(node_name) or + absorb_destination_nodes.include?(node_name) + when NodeMetadata::Role::ABSORB_SOURCE + absorb_destination_nodes.include?(node_name) + else + false + end + end + def live_nodes_list=(new_nodes_list) old_live_nodes_list = @live_nodes_list @live_nodes_list = new_nodes_list Modified: lib/droonga/engine_state.rb (+0 -12) =================================================================== --- lib/droonga/engine_state.rb 2014-12-26 12:00:55 +0900 (1d598e0) +++ lib/droonga/engine_state.rb 2014-12-26 13:08:41 +0900 (05e12ab) @@ -75,18 +75,6 @@ module Droonga route.start_with?(@name) or route.start_with?(@internal_name) end - def unwritable_node?(node_name) - case node_metadata.role - when NodeStatus::Role::SERVICE_PROVIDER - absorb_source_nodes.include?(node_name) or - absorb_destination_nodes.include?(node_name) - when NodeStatus::Role::ABSORB_SOURCE - absorb_destination_nodes.include?(node_name) - else - false - end - end - def farm_path(route) if /\A[^:]+:\d+\/[^.]+/ =~ route name = $MATCH -------------- next part -------------- HTML����������������������������... Télécharger