Skip to content

Commit

Permalink
Merge branch 'master' into phyicalplanexplain
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang0 committed Jul 1, 2022
2 parents cc59699 + f121896 commit c949d4c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ 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);
continue;
Expand Down

0 comments on commit c949d4c

Please sign in to comment.