From 3c355ee6f57cd2796d14f5badb4c277b68924130 Mon Sep 17 00:00:00 2001 From: xufei Date: Fri, 17 Sep 2021 13:26:42 +0800 Subject: [PATCH] cherry pick #28110 to release-5.1 Signed-off-by: ti-srebot --- store/copr/batch_coprocessor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/store/copr/batch_coprocessor.go b/store/copr/batch_coprocessor.go index 2b4e5eb5cc597..5db4ae5cc64e9 100644 --- a/store/copr/batch_coprocessor.go +++ b/store/copr/batch_coprocessor.go @@ -158,7 +158,11 @@ func balanceBatchCopTask(ctx context.Context, kvStore *kvStore, originalTasks [] }, 2*time.Second) if err != nil || !resp.Resp.(*mpp.IsAliveResponse).Available { - logutil.BgLogger().Warn("Cannot detect store's availability", zap.String("store address", s.GetAddr()), zap.String("err message", err.Error())) + errMsg := "store not ready to serve" + if err != nil { + errMsg = err.Error() + } + logutil.BgLogger().Warn("Store is not ready", zap.String("store address", s.GetAddr()), zap.String("err message", errMsg)) mu.Lock() mppStoreLastFailTime[s.GetAddr()] = time.Now() mu.Unlock()