[Groonga-commit] droonga/droonga-engine at 299e7b0 [master] Join to the new serf cluster before modifying of the catalog

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Mar 24 13:19:01 JST 2015


YUKI Hiroshi	2015-03-24 13:19:01 +0900 (Tue, 24 Mar 2015)

  New Revision: 299e7b0cc651e4431c1a3c9f3b0c9e604467dffc
  https://github.com/droonga/droonga-engine/commit/299e7b0cc651e4431c1a3c9f3b0c9e604467dffc

  Message:
    Join to the new serf cluster before modifying of the catalog

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

  Modified: lib/droonga/command/remote.rb (+10 -4)
===================================================================
--- lib/droonga/command/remote.rb    2015-03-24 13:18:48 +0900 (8b853dd)
+++ lib/droonga/command/remote.rb    2015-03-24 13:19:01 +0900 (4bb0fb8)
@@ -327,12 +327,15 @@ module Droonga
 
           log("new replicas: #{hosts.join(",")}")
 
+          log("joining to the cluster")
+          @serf.join(*hosts)
+
+          log("setting replicas to the cluster")
           CatalogModifier.modify do |modifier, file|
             modifier.datasets[dataset].replicas.hosts = hosts
             @service_installation.ensure_correct_file_permission(file)
           end
-
-          @serf.join(*hosts)
+          log("done")
         end
       end
 
@@ -344,13 +347,16 @@ module Droonga
           log("adding replicas: #{added_hosts.join(",")}")
           return if added_hosts.empty?
 
+          log("joining to the cluster")
+          @serf.join(*added_hosts)
+
+          log("adding replicas to the cluster")
           CatalogModifier.modify do |modifier, file|
             modifier.datasets[dataset].replicas.hosts += added_hosts
             modifier.datasets[dataset].replicas.hosts.uniq!
             @service_installation.ensure_correct_file_permission(file)
           end
-
-          @serf.join(*added_hosts)
+          log("done")
         end
       end
 
-------------- next part --------------
HTML����������������������������...
下载 



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