[Groonga-commit] droonga/droonga-engine at 8188d22 [buffered-forward] Copy data by separate step on joining

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Mar 23 19:29:11 JST 2015


YUKI Hiroshi	2015-03-23 19:29:11 +0900 (Mon, 23 Mar 2015)

  New Revision: 8188d2277caab6399964140286285d74888fc5d5
  https://github.com/droonga/droonga-engine/commit/8188d2277caab6399964140286285d74888fc5d5

  Message:
    Copy data by separate step on joining

  Modified files:
    bin/droonga-engine-join

  Modified: bin/droonga-engine-join (+14 -5)
===================================================================
--- bin/droonga-engine-join    2015-03-23 19:29:00 +0900 (1c09a39)
+++ bin/droonga-engine-join    2015-03-23 19:29:11 +0900 (87a5e6c)
@@ -45,7 +45,7 @@ class JoinCommand
     set_node_role
     update_existing_nodes
     do_join
-    monitor_copying_state unless @options["no-copy"]
+    copy_data unless @options["no-copy"]
     set_effective_message_timestamp
     reset_node_role
     puts("Done.")
@@ -180,14 +180,23 @@ class JoinCommand
                        "node"    => joining_node,
                        "type"    => "replica",
                        "source"  => source_node,
-                       "dataset" => @options[:dataset],
-                       "copy"    => !@options["no-copy"])
+                       "dataset" => @options[:dataset])
     wait_until_restarted(joining_node, source_node)
   end
 
-  def monitor_copying_state
-    @start_time_in_seconds = Time.new.to_i
+  def copy_data
     puts("Copying data from the source node...")
+
+    @start_time_in_seconds = Time.new.to_i
+
+    run_remote_command(joining_node, "absorb_data",
+                       "node"    => joining_node,
+                       "source"  => source_node,
+                       "port"    => absorber.port,
+                       "tag"     => absorber.tag,
+                       "dataset" => absorber.dataset,
+                       "messages_per_second" => absorber.messages_per_second)
+
     last_progress = ""
     while true
       sleep(3)
-------------- next part --------------
HTML����������������������������...
Download 



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