Skip to content

Commit

Permalink
store/copr: fix missting Request.TxnScope (#43367) (#43374)
Browse files Browse the repository at this point in the history
close #43365
  • Loading branch information
ti-chi-bot authored Apr 25, 2023
1 parent 7add1ad commit a864476
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions store/copr/coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,9 @@ func (worker *copIteratorWorker) handleTaskOnce(bo *Backoffer, task *copTask, ch
if worker.kvclient.Stats == nil {
worker.kvclient.Stats = make(map[tikvrpc.CmdType]*tikv.RPCRuntimeStats)
}
// set ReadReplicaScope and TxnScope so that req.IsStaleRead will be true when it's a global scope stale read.
req.ReadReplicaScope = worker.req.ReadReplicaScope
req.TxnScope = worker.req.TxnScope
if worker.req.IsStaleness {
req.EnableStaleRead()
}
Expand Down

0 comments on commit a864476

Please sign in to comment.