-
Notifications
You must be signed in to change notification settings - Fork 409
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
*: Refine some logging level #6844
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
9c46a74
to
6a88e9e
Compare
/run-all-tests |
/run-unit-test |
2 similar comments
/run-unit-test |
/run-unit-test |
namespace DB | ||
{ | ||
class Context; | ||
class BackgroundProcessingPool; | ||
class Logger; | ||
using LoggerPtr = std::shared_ptr<Logger>; |
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.
Why use std::shared_ptr
instead of Logger*
?
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.
After we automatically add filename and lineno to the logging message, the "name" in Poco::Logger
is useless. All DB::Logger
defaults share the same root Poco::Logger
instance and remove the [source=<name>]
part from logging.
Sometimes we need a child logger with a specified suffix in the logging, with DB::Logger
, it is more convenient, for example, adding a suffix for the reading routine of MPP request with MPPId, or adding a suffix for different tenant id under multi-tenant. #6816 (comment)
If we create Poco::Logger
with many different names, the Poco _pLoggerMap
will get bigger and bigger without releasing Poco::Logger
instances. But DB::Logger
always shares the same root Poco::Logger
instance.
https://github.com/pingcap/poco/blob/develop/Foundation/src/Logger.cpp#L475-L480
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: b9cfa00
|
@JaySon-Huang: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: ref #6845
Problem Summary:
With logging level "info",
Before this PR when there is no write && read on tiflash, there are more than 15 logging every 30 seconds
After this PR, when there is no write && read, there is only 2 logging every 10 minutes
What is changed and how it works?
Poco::Logger
withDB::Logger
flash.replica_read_max_thread
Check List
Tests
Side effects
Documentation
Release note