[Groonga-commit] droonga/droonga-engine at 16b2761 [master] Restart node after changing of role

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Mar 24 18:59:56 JST 2015


YUKI Hiroshi	2015-03-24 18:59:56 +0900 (Tue, 24 Mar 2015)

  New Revision: 16b276189a963729f4e6c27ae40da4124a00f639
  https://github.com/droonga/droonga-engine/commit/16b276189a963729f4e6c27ae40da4124a00f639

  Message:
    Restart node after changing of role

  Modified files:
    lib/droonga/command/remote.rb
    lib/droonga/serf.rb

  Modified: lib/droonga/command/remote.rb (+1 -1)
===================================================================
--- lib/droonga/command/remote.rb    2015-03-24 18:39:00 +0900 (0d92939)
+++ lib/droonga/command/remote.rb    2015-03-24 18:59:56 +0900 (1c0930d)
@@ -114,9 +114,9 @@ module Droonga
       class ChangeRole < Base
         def process
           log("old role: #{@serf.role}")
-          # this changes cluster information and triggers restarting!
           @serf.role = @params["role"]
           log("new role: #{@serf.role}")
+          @serf.update_cluster_state
         end
       end
 

  Modified: lib/droonga/serf.rb (+1 -1)
===================================================================
--- lib/droonga/serf.rb    2015-03-24 18:39:00 +0900 (bfb86dd)
+++ lib/droonga/serf.rb    2015-03-24 18:59:56 +0900 (6a099ac)
@@ -148,8 +148,8 @@ module Droonga
     def role=(new_role)
       new_role ||= NodeMetadata::Role::SERVICE_PROVIDER
       @node_metadata.role = new_role
-      # this changes cluster information and triggers restarting!
       set_tag("role", new_role)
+      # after that you must run update_cluster_state to update the cluster information cache
     end
 
     def cluster_id
-------------- next part --------------
HTML����������������������������...
下载 



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