Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TrafalgarRicardoLu authored and ti-chi-bot committed Jul 1, 2022
1 parent fceb508 commit fd870e7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ TiRegion loadCurrentRegionToCache() throws GrpcException {
try {
int scanSize = Math.min(limit, conf.getScanBatchSize());
currentCache = client.scan(backOffer, startKey, scanSize, version);
// If we get region before scan, we will use region from cache which
// may have wrong end key. This may miss some regions that split from old region.
// Client will get the newest region during scan. So we need to
// update region after scan.
region = client.getRegion();
} catch (final TiKVException e) {
backOffer.doBackOff(BackOffFunction.BackOffFuncType.BoRegionMiss, e);
Expand Down

0 comments on commit fd870e7

Please sign in to comment.