Skip to content
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

Merged
merged 9 commits into from
Sep 25, 2019
13 changes: 8 additions & 5 deletions store/tikv/client_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Copy link
Member

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?

Copy link
Contributor Author

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.

"sending batch commands meets error",
zap.String("target", c.target),
zap.Error(err),
)
Expand Down Expand Up @@ -260,7 +260,7 @@ func (c *batchCommandsClient) reCreateStreamingClientOnce(err error) error {

return nil
}
logutil.BgLogger().Error(
logutil.BgLogger().Warn(
"batchRecvLoop re-create streaming fail",
zap.String("target", c.target),
zap.Error(err),
Expand All @@ -283,8 +283,11 @@ func (c *batchCommandsClient) batchRecvLoop(cfg config.TiKVClient, tikvTransport
for {
resp, err := c.recv()
if err != nil {
logutil.BgLogger().Error(
"batchRecvLoop error when receive",
if c.isStopped() {
return
}
logutil.BgLogger().Warn(
"batchRecvLoop fails when receiving, needs to reconnect",
zap.String("target", c.target),
zap.Error(err),
)
Expand Down