[Groonga-commit] droonga/droonga-engine at 45909e3 [master] Output more logs

Back to archive index

YUKI Hiroshi null+****@clear*****
Sun Jun 29 03:34:04 JST 2014


YUKI Hiroshi	2014-06-29 03:34:04 +0900 (Sun, 29 Jun 2014)

  New Revision: 45909e30b9850b84d2ce1e0cda3358f4960fbc6b
  https://github.com/droonga/droonga-engine/commit/45909e30b9850b84d2ce1e0cda3358f4960fbc6b

  Message:
    Output more logs

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

  Modified: lib/droonga/command/serf_event_handler.rb (+16 -0)
===================================================================
--- lib/droonga/command/serf_event_handler.rb    2014-06-29 03:30:36 +0900 (5237ddb)
+++ lib/droonga/command/serf_event_handler.rb    2014-06-29 03:34:04 +0900 (26242f9)
@@ -117,7 +117,13 @@ module Droonga
         port         = dataset.port
         other_hosts  = dataset.hosts
 
+        puts "dataset = #{dataset_name}"
+        puts "port    = #{port}"
+        puts "tag     = #{tag}"
+
         if @payload["copy"]
+          puts "starting to copy data from #{source}"
+
           modify_catalog do |modifier|
             modifier.datasets[dataset].replicas.hosts = [host]
           end
@@ -131,12 +137,16 @@ module Droonga
           sleep(1)
         end
 
+        puts "joining to the cluster: update myself"
+
         modify_catalog do |modifier|
           modifier.datasets[dataset].replicas.hosts += other_hosts
           modifier.datasets[dataset].replicas.hosts.uniq!
         end
         sleep(1) # wait for restart
 
+        puts "joining to the cluster: update others"
+
         source_node  = "#{source}:#{port}/#{tag}"
         Serf.send_query(source_node, "add_replicas",
                         "dataset" => dataset,
@@ -150,6 +160,8 @@ module Droonga
         hosts = given_hosts
         return unless hosts
 
+        puts "new replicas: #{hosts.join(",")}"
+
         modify_catalog do |modifier|
           modifier.datasets[dataset].replicas.hosts = hosts
         end
@@ -162,6 +174,8 @@ module Droonga
         hosts = given_hosts
         return unless hosts
 
+        puts "adding replicas: #{hosts.join(",")}"
+
         modify_catalog do |modifier|
           modifier.datasets[dataset].replicas.hosts += hosts
           modifier.datasets[dataset].replicas.hosts.uniq!
@@ -175,6 +189,8 @@ module Droonga
         hosts = given_hosts
         return unless hosts
 
+        puts "removing replicas: #{hosts.join(",")}"
+
         modify_catalog do |modifier|
           modifier.datasets[dataset].replicas.hosts -= hosts
         end
-------------- next part --------------
HTML����������������������������...
Télécharger 



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