-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
Codecov Report
@@ Coverage Diff @@
## main #182 +/- ##
=====================================
Coverage 75.6% 75.7%
=====================================
Files 95 95
Lines 4360 4371 +11
=====================================
+ Hits 3299 3311 +12
Misses 738 738
+ Partials 323 322 -1
|
https://github.com/open-telemetry/opentelemetry-log-collection/pull/183/checks?check_run_id=2808466320 |
@rockb1017 What conclusion are you drawing from this? |
I naively deleted a blocked of code that seemed to be inefficient and unnecessary. Could you run a few more times just to be sure ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
A few notes on this PR.
- See explanation here of what was wrong with the previous attempt.
- In addition to believing that we have a good handle on the issues involved, I've rerun unit tests about 10 times and have observed no failures.
- @rockb1017 has incorporated this branch into a build of the collector, and run it on k8s as part of a benchmark. He observed 100% delivery rate, and has posted the results here.
- I'm confident that this is an improvement upon the previous release because it verifiably addresses a clear problem that was identified and does not regress in any regard that is currently tested. However, it is possible that further edge cases may be identified in the future.
- I am drafting a design doc that explains how this operator works. I'll share this and will welcome feedback, especially as it pertains to possible improvements.
- The codebase for this operator could be improved through refactoring. This is out of scope for this PR, but will be an ongoing focus for this project.
- Similarly, the test suite for this operator needs improvement. Some tests are currently non-deterministic. Some edge cases could be tested independently. This will also be an ongoing effort, but should not hold up this PR.
@tigrannajaryan, I'd appreciate any thoughts you have on these changes, or on the suggestion that we merge this and continue to improve from there.
@rockb1017 can you please update the PR description, squash the commit into one and add a commit message that fully explains why the changes are made and how they fix the problem. |
…s open till next poll cycle. Fix test cases for new implementaion and skip move-create tests for windows
Thanks @rockb1017 and @djaglowski ! |
* reorg test files only, ported from open-telemetry/opentelemetry-log-collection#165 * port otel enhanced file input benchmarking open-telemetry/opentelemetry-log-collection#166 * skip closing files that are already closed * port otel file rotation tracking open-telemetry/opentelemetry-log-collection#182 * fix poll()
continuing #168
fixes #85
instead of closing all files at the end of
poll
cycle, keep them open till next poll cycle. Only after opening all matched files, consume files that kept open from previous poll and close. By having this "overlap" at each cycle, we make sure we have trace of moved away files and consume any logs that were written to it but not yet read before being rotated.In addition, there were "Move/Create" rotation tests not being skipped for windows. I skipped those.