Skip to content

Commit

Permalink
increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang0 committed May 25, 2023
1 parent 8f2c8a3 commit 1d61e04
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private SelectResponse process(RegionTask regionTask) {
remainTasks.add(regionTask);
BackOffer backOffer = ConcreteBackOffer.newCopNextMaxBackOff();
HashSet<Long> resolvedLocks = new HashSet<>();
BackOffer storeUnreachableBackOffer = ConcreteBackOffer.newCustomBackOff(60 * 1000);
BackOffer storeUnreachableBackOffer = ConcreteBackOffer.newCustomBackOff(120 * 1000);

// In case of one region task spilt into several others, we ues a queue to properly handle all
// the remaining tasks.
Expand All @@ -223,10 +223,7 @@ private SelectResponse process(RegionTask regionTask) {

try {
if (store == null || !store.isReachable()) {
if (!storeUnreachableBackOffer.canRetryAfterSleep(
BackOffFunction.BackOffFuncType.BoUpdateLeader)) {
throw new TiClientInternalException("retry timeout: store is null or unreachable");
}
storeUnreachableBackOffer.doBackOffWithMaxSleep(BackOffFunction.BackOffFuncType.BoServerBusy,2000,new TiClientInternalException("retry timeout: store is null or unreachable"));
logger.info("TiKV store is null or unreachable, invalid cache and retry");
clientSession.getTiKVSession().getRegionManager().invalidateRegion(region);
remainTasks.addAll(
Expand Down

0 comments on commit 1d61e04

Please sign in to comment.