From cb8a2ce2d18923143503c6edf993a057cd402e2f Mon Sep 17 00:00:00 2001 From: Masahiro Nakagawa Date: Wed, 15 Mar 2017 18:19:34 +0900 Subject: [PATCH] Update comment for start sequence problem --- lib/fluent/root_agent.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/fluent/root_agent.rb b/lib/fluent/root_agent.rb index 3d839816ba..2ea9483a48 100644 --- a/lib/fluent/root_agent.rb +++ b/lib/fluent/root_agent.rb @@ -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