-
Notifications
You must be signed in to change notification settings - Fork 377
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
Use circular buffer for zap logs #585
Conversation
…e-564-BufferZap
…into issue-564-BufferZap
…e-564-BufferZap
…into issue-564-BufferZap
Codecov Report
@@ Coverage Diff @@
## main #585 +/- ##
==========================================
+ Coverage 63.44% 63.59% +0.14%
==========================================
Files 191 192 +1
Lines 7636 7667 +31
==========================================
+ Hits 4845 4876 +31
Misses 2233 2233
Partials 558 558
Flags with carried forward coverage won't be shown. Click here to find out more. |
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 should also add a method to get stored entires back as a slice ([]zap.Entry
), covering cases when ring buffer is not full yet. I.e. we should not always return 1024 slice elements with some of them being nil
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.
As for me, PR task was also unclear and very interesting. )
I read #420 and #564 and understood a few.
@fenogentov I would be thankful if yod' tell all the benefits of this. (i.e. why does FerretDB need this task? Wait, maybe @AlekSi can explain better, what is the issue is solved? Anyway, what is the thing with it?)
@fenogentov linters failing. |
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.
package description is required, unfortunately, I can't find it.
everything else LGTM.
logging package is common, so the description of the structure explains why this functionality |
…e-564-BufferZap
…into issue-564-BufferZap
…e-564-BufferZap
Co-authored-by: Dmitry <dmitry.eremenko@ferretdb.io>
…e-564-BufferZap
…into issue-564-BufferZap
…e-564-BufferZap
Closes #564.