Skip to content

Commit

Permalink
Merge pull request #1738 from fluent/fix-heartbeat-tick-check
Browse files Browse the repository at this point in the history
Move tick check to after heartbeat for avoiding the impact of other node heartbeat. fix #1719
  • Loading branch information
repeatedly authored Nov 7, 2017
2 parents d4e2851 + 59d30bd commit c61cfbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,6 @@ def rebuild_weight_array

def on_timer
@nodes.each {|n|
if n.tick
rebuild_weight_array
end
begin
log.trace "sending heartbeat", host: n.host, port: n.port, heartbeat_type: @heartbeat_type
n.usock = @usock if @usock
Expand All @@ -407,6 +404,9 @@ def on_timer
rescue => e
log.debug "unexpected error happen during heartbeat", host: n.host, port: n.port, heartbeat_type: @heartbeat_type, error: e
end
if n.tick
rebuild_weight_array
end
}
end

Expand Down

0 comments on commit c61cfbf

Please sign in to comment.