-
Notifications
You must be signed in to change notification settings - Fork 950
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
feature: use ringBuffer to make log not blocking and make it configurable #2428
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2428 +/- ##
==========================================
- Coverage 69.2% 69.11% -0.09%
==========================================
Files 277 278 +1
Lines 18330 18387 +57
==========================================
+ Hits 12685 12709 +24
- Misses 4206 4242 +36
+ Partials 1439 1436 -3
|
daemon/mgr/container_logger.go
Outdated
} | ||
|
||
if info.LogConfig["mode"] == LogNonBlocking { | ||
return bufferlog.NewBufferLog(ld, info) |
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.
could we postpone to start the goroutine after startLogging?
d7e2c97
to
c6e6f14
Compare
70b8fe0
to
5eaadc6
Compare
@HusterWan @fuweid All mentioned above has been updated. PTAL. THX. |
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.
we can't use origin ringbuffer implementation. we should change it.
8d3b1b7
to
852dc7f
Compare
Basically, LGTM. But, @starnop could you help to add benchmark cases for the logbuffer? |
852dc7f
to
75826f5
Compare
Maybe add benchmark cases in the next PR? |
oops. @starnop could you help to take a look for this?
|
Sure. |
75826f5
to
d560486
Compare
Has been fixed. |
d560486
to
7ad6bbe
Compare
4cdf322
to
32d02ed
Compare
Signed-off-by: Starnop <starnop@163.com>
32d02ed
to
b4d3081
Compare
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.
LGTM
Signed-off-by: Starnop starnop@163.com
Ⅰ. Describe what this PR did
As the title describes.
Ⅱ. Does this pull request fix one issue?
None.
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Add it Later.
Ⅳ. Describe how to verify it
Add it Later.
Ⅴ. Special notes for reviews