[Groonga-commit] droonga/droonga-engine at 6af6c30 [master] Wait until data is completely absorbed

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jul 23 17:01:44 JST 2014


YUKI Hiroshi	2014-07-23 17:01:44 +0900 (Wed, 23 Jul 2014)

  New Revision: 6af6c30d9ec6b0905d3472402880c64758a7afdd
  https://github.com/droonga/droonga-engine/commit/6af6c30d9ec6b0905d3472402880c64758a7afdd

  Message:
    Wait until data is completely absorbed

  Modified files:
    bin/droonga-engine-join

  Modified: bin/droonga-engine-join (+10 -0)
===================================================================
--- bin/droonga-engine-join    2014-07-23 16:59:41 +0900 (00d9594)
+++ bin/droonga-engine-join    2014-07-23 17:01:44 +0900 (b996e4c)
@@ -122,6 +122,7 @@ def run_remote_command(target, command, options)
   result = Droonga::Serf.send_query(target, command, options)
   puts result[:result]
   puts result[:error] unless result[:error].empty?
+  result[:response]
 end
 
 =begin
@@ -142,6 +143,15 @@ run_remote_command(options.joining_node, "join",
 #                   "fetch_port" => publish_port,
                    "copy"   => options.copy)
 
+while true
+  sleep(3)
+  response = run_remote_command(options.joining_node, "report_status",
+                                "node" => options.joining_node,
+                                "key" => "absorbing")
+  absorbing = response["value"]
+  break unless absorbing
+end
+
 puts "Update existing hosts in the cluster..."
 run_remote_command(options.source_node, "add_replicas",
                    "dataset" => options.dataset,
-------------- next part --------------
HTML����������������������������...
Download 



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