Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,14 @@ private boolean onRegionEpochNotMatch(BackOffer backOffer, List<Metapb.Region> c
@Override
public boolean handleRequestError(BackOffer backOffer, Exception e) {
if (recv.onStoreUnreachable()) {
backOffer.doBackOff(BackOffFunction.BackOffFuncType.BoTiKVRPC, e);
try {
backOffer.doBackOff(BackOffFunction.BackOffFuncType.BoTiKVRPC, e);
} catch (Exception boErr) {
logger.warn(
String.format("backoff time exceed, invalidate region[%d]", recv.getRegion().getId()));
regionManager.onRequestFail(recv.getRegion());
throw boErr;
}
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ public boolean onStoreUnreachable() {
// reduce the latency cost by fail requests.
if (targetStore.canForwardFirst()) {
if (conf.getEnableGrpcForward() && retryForwardTimes <= region.getFollowerList().size()) {
return retryOtherStoreByProxyForward();
if (retryOtherStoreByProxyForward()) {
return true;
}
}
if (retryOtherStoreLeader()) {
return true;
Expand All @@ -154,7 +156,9 @@ public boolean onStoreUnreachable() {
return true;
}
if (conf.getEnableGrpcForward() && retryForwardTimes <= region.getFollowerList().size()) {
return retryOtherStoreByProxyForward();
if (retryOtherStoreByProxyForward()) {
return true;
}
}
return true;
}
Expand Down