From b9390a91e7cc485dcf676c136561f3e05d675892 Mon Sep 17 00:00:00 2001 From: qupeng Date: Wed, 25 Sep 2019 15:13:01 +0800 Subject: [PATCH] tikvclient: adjust log level in store/tikv/client_batch.go (#12302) Signed-off-by: qupeng --- store/tikv/client_batch.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/store/tikv/client_batch.go b/store/tikv/client_batch.go index 36318dd9b8e1f..9aaba5da7b14b 100644 --- a/store/tikv/client_batch.go +++ b/store/tikv/client_batch.go @@ -207,8 +207,8 @@ func (c *batchCommandsClient) send(request *tikvpb.BatchCommandsRequest, entries c.batched.Store(requestID, entries[i]) } if err := c.client.Send(request); err != nil { - logutil.Logger(context.Background()).Error( - "batch commands send error", + logutil.Logger(context.Background()).Info( + "sending batch commands meets error", zap.String("target", c.target), zap.Error(err), ) @@ -252,7 +252,7 @@ func (c *batchCommandsClient) reCreateStreamingClientOnce(err error) error { return nil } - logutil.Logger(context.Background()).Error( + logutil.Logger(context.Background()).Info( "batchRecvLoop re-create streaming fail", zap.String("target", c.target), zap.Error(err), @@ -275,8 +275,11 @@ func (c *batchCommandsClient) batchRecvLoop(cfg config.TiKVClient, tikvTransport for { resp, err := c.recv() if err != nil { - logutil.Logger(context.Background()).Error( - "batchRecvLoop error when receive", + if c.isStopped() { + return + } + logutil.Logger(context.Background()).Info( + "batchRecvLoop fails when receiving, needs to reconnect", zap.String("target", c.target), zap.Error(err), )