You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the major log duplication problem about follow_inodes is fixed in #4237.
However, there is still a possibility of duplication (#4237 (comment)).
in_tail possibly collects duplicated logs in rotate_wait.
Mulitple TailWatchers can exist in rotate_wait, so they possibly collect the same target in that interval.
We need the mechanism not to add duplicated TailWathcer while detaching it.
I also wrote the code comment as follows in #4237:
As above, rotate_wait causes the situation that multiple TailWatchers exist for the same target temporarily.
This causes log duplication.
I have confirmed this on v1.16.1.
I think this will never be a problem when using follow_inodes false because we can't use wildcards for path setting with follow_inodes false. (It is the specification that log duplication can occur if using wildcards with follow_inodes false)
Describe the bug
I think the major log duplication problem about
follow_inodes
is fixed in #4237.However, there is still a possibility of duplication (#4237 (comment)).
in_tail
possibly collects duplicated logs inrotate_wait
.Mulitple
TailWatcher
s can exist inrotate_wait
, so they possibly collect the same target in that interval.We need the mechanism not to add duplicated
TailWathcer
while detaching it.I also wrote the code comment as follows in #4237:
fluentd/lib/fluent/plugin/in_tail.rb
Lines 507 to 515 in d5685ad
This is not something like that all logs in one file are entirely duplicated.
(I believe such problems were resolved in #4237)
Detail explanation (from #4237 (comment))
The scenario: rotate -> update_watcher -> refresh_watcher ->
rotate_wait
elapsedrotate_wait
elapsedAs above,
rotate_wait
causes the situation that multiple TailWatchers exist for the same target temporarily.This causes log duplication.
I have confirmed this on v1.16.1.
To Reproduce
From #4237 (comment).
Use the config below.
test.log.1
.refresh_interval
NOT elapsed androtate_wait
NOT elapsedrefresh_interval
elapsed androtate_wait
NOT elapsedrefresh_interval
elapsed androtate_wait
elapsedExpected behavior
Log duplication does not occur.
Your Environment
Your Configuration
Your Error Log
Additional context
We can set
rotate_wait 0
for a workaround.The text was updated successfully, but these errors were encountered: