Skip to content

Commit

Permalink
Update comment for start sequence problem
Browse files Browse the repository at this point in the history
  • Loading branch information
repeatedly committed Mar 15, 2017
1 parent 7676fe1 commit cb8a2ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/fluent/root_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,12 @@ def lifecycle(desc: false, kind_callback: nil)
def start
lifecycle(desc: true) do |i| # instance
i.start unless i.started?
# Input#start emits lots of evetns with in_tail/`read_from_head true` case and
# it causes deadlock for small buffer/queue output. To avoid such problem,
# Input#start sometimes emits lots of evetns with in_tail/`read_from_head true` case
# and it causes deadlock for small buffer/queue output. To avoid such problem,
# buffer related output threads should be run before `Input#start`.
# This is why after_start should be called immediately after start call.
# This depends on `desc: true` because calling plugin order of `desc: true` is
# Output, Filter, Label, Output with Router and Input.
i.after_start unless i.after_started?
end
end
Expand Down

0 comments on commit cb8a2ce

Please sign in to comment.