Skip to content

Commit

Permalink
fix missting Request.TxnScope
Browse files Browse the repository at this point in the history
Signed-off-by: you06 <you1474600@gmail.com>
  • Loading branch information
you06 committed Apr 24, 2023
1 parent 66814ac commit 175dd47
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 175dd47

Please sign in to comment.