Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Jul 1, 2022
1 parent f21bc22 commit f7f8f88
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions store/copr/coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,9 +965,13 @@ func (worker *copIteratorWorker) handleCopResponse(bo *Backoffer, rpcCtx *tikv.R
copy(end, cacheValue.PageEnd)
}
// When paging protocol is used, the response key range is part of the cache data.
resp.pbResp.Range = &coprocessor.KeyRange{
Start: start,
End: end,
if start != nil || end != nil {
resp.pbResp.Range = &coprocessor.KeyRange{
Start: start,
End: end,
}
} else {
resp.pbResp.Range = nil
}
}
resp.detail.CoprCacheHit = true
Expand Down

0 comments on commit f7f8f88

Please sign in to comment.