Skip to content

Commit

Permalink
Merge branch 'master' into phyicalplanexplain
Browse files Browse the repository at this point in the history
  • Loading branch information
qidi1 committed Jul 1, 2022
2 parents 46cb114 + f121896 commit 06c85a0
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 06c85a0

Please sign in to comment.