Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix invalid cache for range exceeds bound #780

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main/java/org/tikv/common/region/RegionStoreClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,15 @@

String otherError = response.getOtherError();
if (!otherError.isEmpty()) {
// Invalid cache and split ranges for range exceeds bound error
if (otherError.contains("range exceeds bound")) {
backOffer.doBackOff(

Check warning on line 744 in src/main/java/org/tikv/common/region/RegionStoreClient.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/tikv/common/region/RegionStoreClient.java#L744

Added line #L744 was not covered by tests
BackOffFunction.BackOffFuncType.BoRegionMiss, new GrpcException("range exceeds bound"));
this.regionManager.invalidateRegion(this.region);
logger.warn(
String.format("Invalid cache and re-splitting region task due to: %s.", otherError));
return RangeSplitter.newSplitter(this.regionManager).splitRangeByRegion(ranges, storeType);

Check warning on line 749 in src/main/java/org/tikv/common/region/RegionStoreClient.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/tikv/common/region/RegionStoreClient.java#L746-L749

Added lines #L746 - L749 were not covered by tests
}
logger.warn(String.format("Other error occurred, message: %s", otherError));
throw new GrpcException(otherError);
}
Expand Down
Loading