Skip to content

Commit

Permalink
invalid cache for range exceeds bound
Browse files Browse the repository at this point in the history
Signed-off-by: shiyuhang <[email protected]>
  • Loading branch information
shiyuhang0 committed Mar 19, 2024
1 parent 533dbc2 commit 8a6527a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 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,13 @@ private List<RangeSplitter.RegionTask> handleCopResponse(

String otherError = response.getOtherError();
if (!otherError.isEmpty()) {
// Invalid cache and split ranges for range exceeds bound error
if (otherError.contains("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 747 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-L747

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

0 comments on commit 8a6527a

Please sign in to comment.