[Groonga-commit] droonga/droonga-engine at 36be4f6 [master] Join to the cluster before absorb

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Jan 15 17:24:45 JST 2015


YUKI Hiroshi	2015-01-15 17:24:45 +0900 (Thu, 15 Jan 2015)

  New Revision: 36be4f62851b8803f0e8a9c107a1de51ce0dac11
  https://github.com/droonga/droonga-engine/commit/36be4f62851b8803f0e8a9c107a1de51ce0dac11

  Message:
    Join to the cluster before absorb
    
    Conflicts:
    	bin/droonga-engine-join

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

  Modified: lib/droonga/command/remote.rb (+6 -2)
===================================================================
--- lib/droonga/command/remote.rb    2015-01-15 17:20:36 +0900 (e12b93d)
+++ lib/droonga/command/remote.rb    2015-01-15 17:24:45 +0900 (329d3ef)
@@ -192,14 +192,14 @@ module Droonga
           log("other_hosts = #{other_hosts}")
           return if other_hosts.empty?
 
+          @serf.role = NodeMetadata::Role::ABSORB_DESTINATION
+
           # restart self with the fetched catalog.
           SafeFileWriter.write(Path.catalog) do |output, file|
             output.puts(JSON.pretty_generate(@catalog))
             @service_installation.ensure_correct_file_permission(file)
           end
 
-          absorb_data if should_absorb_data?
-
           log("joining to the cluster: update myself")
 
           CatalogModifier.modify do |modifier, file|
@@ -209,6 +209,10 @@ module Droonga
           end
 
           @serf.join(*other_hosts)
+
+          absorb_data if should_absorb_data?
+
+          @serf.role = nil
         end
 
         def replica_hosts
-------------- next part --------------
HTML����������������������������...
下載 



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