YUKI Hiroshi
null+****@clear*****
Mon Mar 23 19:27:33 JST 2015
YUKI Hiroshi 2015-03-23 19:27:33 +0900 (Mon, 23 Mar 2015) New Revision: 95272f527309369408bf8343409cf2f09168dc51 https://github.com/droonga/droonga-engine/commit/95272f527309369408bf8343409cf2f09168dc51 Message: Don't absorb by the "join" remote command. Because updating of the catalog restarts the engine process itself. Modified files: lib/droonga/command/remote.rb Modified: lib/droonga/command/remote.rb (+2 -28) =================================================================== --- lib/droonga/command/remote.rb 2015-03-23 11:40:17 +0900 (eaf3048) +++ lib/droonga/command/remote.rb 2015-03-23 19:27:33 +0900 (9886e39) @@ -179,10 +179,6 @@ module Droonga @tag ||= (source_node =~ NODE_PATTERN && $3) end - def should_absorb_data? - @params["copy"] - end - def join_as_replica return unless valid_params? @@ -195,7 +191,6 @@ module Droonga return if @other_hosts.empty? join_to_cluster - absorb_data if should_absorb_data? end def replica_hosts @@ -218,34 +213,13 @@ module Droonga def join_to_cluster log("joining to the cluster: update myself") + @serf.join(*@other_hosts) + CatalogModifier.modify do |modifier, file| modifier.datasets[dataset_name].replicas.hosts += @other_hosts modifier.datasets[dataset_name].replicas.hosts.uniq! @service_installation.ensure_correct_file_permission(file) end - - @serf.join(*@other_hosts) - sleep(5) - - @serf.update_cluster_state - end - - def absorb_data - log("starting to copy data from #{source_host}") - - metadata = NodeMetadata.new - metadata.set(:absorbing, true) - Restarter.restart(5) - - DataAbsorber.absorb(:dataset => dataset_name, - :source_host => source_host, - :destination_host => joining_host, - :port => port, - :tag => tag, - :messages_per_second => messages_per_second) - - metadata.delete(:absorbing) - Restarter.restart(5) end end -------------- next part -------------- HTML����������������������������... Download