Navigation Menu

Skip to content

Commit

Permalink
Don't set the "destination" role by self.
Browse files Browse the repository at this point in the history
Because the process is not finished.
  • Loading branch information
piroor committed Jan 15, 2015
1 parent fa673f3 commit 155e404
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 8 additions & 0 deletions bin/droonga-engine-join
Expand Up @@ -152,6 +152,10 @@ class JoinCommand
"node" => source_node,
"role" => Droonga::NodeMetadata::Role::ABSORB_SOURCE)
end
run_remote_command(joining_node, "change_role",
"node" => joining_node,
"role" => Droonga::NodeMetadata::Role::ABSORB_DESTINATION)
@node_role_changed = true
end

def reset_node_role
Expand All @@ -160,6 +164,10 @@ class JoinCommand
"node" => source_node,
"role" => nil)
end
run_remote_command(joining_node, "change_role",
"node" => joining_node,
"role" => nil)
@node_role_changed = false
end

def do_join
Expand Down
5 changes: 0 additions & 5 deletions lib/droonga/command/remote.rb
Expand Up @@ -192,13 +192,8 @@ def join_as_replica
log("other_hosts = #{@other_hosts}")
return if @other_hosts.empty?

@serf.role = NodeMetadata::Role::ABSORB_DESTINATION

join_to_cluster

absorb_data if should_absorb_data?

@serf.role = nil
end

def replica_hosts
Expand Down

0 comments on commit 155e404

Please sign in to comment.