Skip to content

Commit

Permalink
cherry pick #28110 to release-5.1
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <[email protected]>
  • Loading branch information
windtalker authored and ti-srebot committed Sep 17, 2021
1 parent d67969c commit 3c355ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion store/copr/batch_coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3c355ee

Please sign in to comment.