Navigation Menu

Skip to content

Commit

Permalink
Remove codes to send messages for dead nodes.
Browse files Browse the repository at this point in the history
It should be re-introduced after 1.0.4.
  • Loading branch information
piroor committed Jun 27, 2014
1 parent 43fbf89 commit 6def76c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lib/droonga/dispatcher.rb
Expand Up @@ -171,27 +171,10 @@ def dispatch(message, destination)
def dispatch_steps(steps)
id = @engine_state.generate_id

one_way_steps = []
one_way_destinations = []
have_dead_nodes = !@engine_state.dead_nodes.empty?

destinations = []
steps.each do |step|
dataset = @catalog.dataset(step["dataset"])
if dataset
if have_dead_nodes and write_step?(step)
routes = dataset.get_routes(step, @engine_state.dead_nodes)
unless routes.empty?
one_way_step = Marshal.load(Marshal.dump(step))
one_way_step["routes"] = routes
one_way_step.delete("post")
one_way_step.delete("outputs")
one_way_steps << one_way_step
one_way_destinations += routes.collect do |route|
farm_path(route)
end
end
end
routes = dataset.get_routes(step, @engine_state.live_nodes)
step["routes"] = routes
else
Expand All @@ -206,14 +189,6 @@ def dispatch_steps(steps)
destinations.uniq.each do |destination|
dispatch(dispatch_message, destination)
end

unless one_way_steps.empty?
dispatch_message = { "id" => @engine_state.generate_id,
"steps" => one_way_steps }
one_way_destinations.uniq.each do |destination|
dispatch(dispatch_message, destination)
end
end
end

def process_local_message(local_message)
Expand Down

0 comments on commit 6def76c

Please sign in to comment.