mirror of https://github.com/tikv/client-go.git
Add afterSendReqToRegion failpoint (#780)
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com> Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
This commit is contained in:
parent
35c1ee47c4
commit
2be71b35ee
|
|
@ -1211,6 +1211,13 @@ func (s *RegionRequestSender) SendReqCtx(
|
|||
return nil, nil, retryTimes, err
|
||||
}
|
||||
|
||||
if _, err1 := util.EvalFailpoint("afterSendReqToRegion"); err1 == nil {
|
||||
if hook := bo.GetCtx().Value("sendReqToRegionFinishHook"); hook != nil {
|
||||
h := hook.(func(*tikvrpc.Request, *tikvrpc.Response, error))
|
||||
h(req, resp, err)
|
||||
}
|
||||
}
|
||||
|
||||
// recheck whether the session/query is killed during the Next()
|
||||
boVars := bo.GetVars()
|
||||
if boVars != nil && boVars.Killed != nil && atomic.LoadUint32(boVars.Killed) == 1 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue