-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle both of stat and timer watchers are enabled and steady growing file case #3364
Conversation
files case In this case, timer watcher tells file contents every 1 seconds and file contents changes is also notified from stats watcher. In such circumstances, if some tailing files are steadily growing, previous implementation does not prevent log ingestion for written contents which is notified by stat watcher. This commit also prevents log ingestion in such cases. Signed-off-by: Hiroshi Hatake <[email protected]>
3dc9367
to
27bb805
Compare
Signed-off-by: Hiroshi Hatake <[email protected]>
Signed-off-by: Takuro Ashie <[email protected]>
An idea is that adding a hook to touch the test log file to Please see the following example: |
Signed-off-by: Hiroshi Hatake <[email protected]>
Signed-off-by: Hiroshi Hatake <[email protected]>
1757297
to
bee9125
Compare
I'd considered this and I decided to add two testing scenarios. Both scenarios return same number of events per emits. |
I'm checking the tests, I feel some curious points. |
I've added a commit but probably it will fail on mac & windows. |
* Check elapsed time * Check exact number of emitted events * Check inotify is surely emitted * Remove a needless test. Signed-off-by: Takuro Ashie <[email protected]>
Because they doesn't support inotify. Signed-off-by: Takuro Ashie <[email protected]>
81162e9
to
d4d0118
Compare
Thanks! |
Signed-off-by: Hiroshi Hatake [email protected]
Which issue(s) this PR fixes:
Follows up #3185
What this PR does / why we need it:
In this case, timer watcher tells file contents every 1 seconds and file
contents changes is also notified from stats watcher.
In such circumstances, if some tailing files are steadily growing,
previous implementation does not prevent log ingestion for written
contents which is notified by stat watcher.
This commit also prevents log ingestion in such cases.
Docs Changes:
No needed.
Release Note:
Same as title.
Additional context
I can implement this edge case patch, but how can we write down into test cases...?