[Groonga-commit] droonga/droonga-engine at 155e404 [buffered-forward] Don't set the "destination" role by self.

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Jan 15 17:37:03 JST 2015


YUKI Hiroshi	2015-01-15 17:37:03 +0900 (Thu, 15 Jan 2015)

  New Revision: 155e404efd207cb504ce99ba842779d7909bc34d
  https://github.com/droonga/droonga-engine/commit/155e404efd207cb504ce99ba842779d7909bc34d

  Message:
    Don't set the "destination" role by self.
    
    Because the process is not finished.

  Modified files:
    bin/droonga-engine-join
    lib/droonga/command/remote.rb

  Modified: bin/droonga-engine-join (+8 -0)
===================================================================
--- bin/droonga-engine-join    2015-01-15 17:29:04 +0900 (ed79599)
+++ bin/droonga-engine-join    2015-01-15 17:37:03 +0900 (c2614aa)
@@ -152,6 +152,10 @@ class JoinCommand
                          "node" => source_node,
                          "role" => Droonga::NodeMetadata::Role::ABSORB_SOURCE)
     end
+    run_remote_command(joining_node, "change_role",
+                       "node" => joining_node,
+                       "role" => Droonga::NodeMetadata::Role::ABSORB_DESTINATION)
+    @node_role_changed = true
   end
 
   def reset_node_role
@@ -160,6 +164,10 @@ class JoinCommand
                          "node" => source_node,
                          "role" => nil)
     end
+    run_remote_command(joining_node, "change_role",
+                       "node" => joining_node,
+                       "role" => nil)
+    @node_role_changed = false
   end
 
   def do_join

  Modified: lib/droonga/command/remote.rb (+0 -5)
===================================================================
--- lib/droonga/command/remote.rb    2015-01-15 17:29:04 +0900 (8e56db5)
+++ lib/droonga/command/remote.rb    2015-01-15 17:37:03 +0900 (48f9e21)
@@ -192,13 +192,8 @@ module Droonga
           log("other_hosts = #{@other_hosts}")
           return if @other_hosts.empty?
 
-          @serf.role = NodeMetadata::Role::ABSORB_DESTINATION
-
           join_to_cluster
-
           absorb_data if should_absorb_data?
-
-          @serf.role = nil
         end
 
         def replica_hosts
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index