-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
tikvclient: adjust log level in store/tikv/client_batch.go #12302
Conversation
Signed-off-by: qupeng <qupeng@pingcap.com>
store/tikv/client_batch.go
Outdated
@@ -215,8 +215,8 @@ func (c *batchCommandsClient) send(request *tikvpb.BatchCommandsRequest, entries | |||
c.batched.Store(requestID, entries[i]) | |||
} | |||
if err := c.client.Send(request); err != nil { | |||
logutil.BgLogger().Error( | |||
"batch commands send error", | |||
logutil.BgLogger().Warn( |
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.
can we set it to debug
or info
? or can we not print this message since the user no need to worry about these kinds of logs?
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 prefer to set it to info
if you think it's better.
Except waitting responses. In this case logs will be printed when responses are not received after 60s. Signed-off-by: qupeng <qupeng@pingcap.com>
Codecov Report
@@ Coverage Diff @@
## master #12302 +/- ##
===========================================
Coverage 80.8442% 80.8442%
===========================================
Files 454 454
Lines 99756 99756
===========================================
Hits 80647 80647
Misses 13318 13318
Partials 5791 5791 |
Signed-off-by: qupeng <qupeng@pingcap.com>
… recycle-conn-without-log
PTAL @zz-jason @tiancaiamao |
@hicqu please follow the Commit Message and Pull Request Style guide to reformat the PR title. BTW, please add some proper labels for this PR. |
PTAL @zz-jason |
LGTM |
@@ -215,8 +215,8 @@ func (c *batchCommandsClient) send(request *tikvpb.BatchCommandsRequest, entries | |||
c.batched.Store(requestID, entries[i]) | |||
} | |||
if err := c.client.Send(request); err != nil { | |||
logutil.BgLogger().Error( | |||
"batch commands send error", | |||
logutil.BgLogger().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.
which metric can we use to identity send failure if user use error/warn level
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.
Seems in the module there is no such metric. Is it better to put the metric into SendRequest
callers?
LGTM |
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
cherry pick to release-3.0 failed |
…2302) Signed-off-by: qupeng <qupeng@pingcap.com>
What problem does this PR solve?
Some error logs could make users confused.
What is changed and how it works?
Change some log level from Error to Warn, because TiDB can auto recover from those errors.
Check List
Tests
No code. Because it just adjusts log level.
Code changes
Checked.
Side effects
No.
Related changes
Need to cherry-pick to release-3.0.
Release note
No.