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
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().Info(
Copy link
Collaborator

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

Copy link
Contributor Author

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?

"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().Info(
"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().Info(
"batchRecvLoop fails when receiving, needs to reconnect",
zap.String("target", c.target),
zap.Error(err),
)
Expand Down