-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][broker]Change the log level to reduce repeated error logs #23192
Conversation
9513ecb
to
2fee54a
Compare
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java
Show resolved
Hide resolved
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.
I think it's better to add a solution that logs it once on the first time at error level and after that at debug level.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23192 +/- ##
============================================
+ Coverage 73.57% 74.49% +0.91%
- Complexity 32624 33694 +1070
============================================
Files 1877 1922 +45
Lines 139502 144762 +5260
Branches 15299 15834 +535
============================================
+ Hits 102638 107838 +5200
+ Misses 28908 28647 -261
- Partials 7956 8277 +321
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Change as suggested |
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java
Outdated
Show resolved
Hide resolved
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. Good work @rayluoluo
Fixes #23191
Motivation
If the pre-installed NIC is not activated, the NIC driver is not supported, or a virtual NIC is used, the software may fail to read the NIC speed. As a result, the pulsar broker continuously prints error logs every minute. In fact, the system is not in a fault state in these cases. In addition, repeated error logs increase performance overhead and log storage space, and affect log reading and analysis.
An example of the error log is as follows:
Modifications
Actually, the system is not in the faulty state. It's ok to change the log level to debug.
Verifying this change
Documentation
doc
doc-required
doc-not-needed
doc-complete