Skip to content

Commit

Permalink
fix l5 update bug (#114)
Browse files Browse the repository at this point in the history
* fix l5 update bug

* fix l5 update bug
  • Loading branch information
abyswang authored Mar 30, 2023
1 parent e294bf8 commit 26f29ec
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/main/java/org/apache/hadoop/fs/CosNativeFileSystemStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,20 @@ private <X> Object callCOSClientWithRetry(X request) throws CosServiceException,
throw cse;
}
} catch (Exception e) {
throw new IOException(e);
if (useL5Id) {
if (l5ErrorCodeRetryIndex >= this.l5UpdateMaxRetryTimes) {
// L5上报,进行重试
l5EndpointResolver.updateRouteResult(-1);
l5ErrorCodeRetryIndex = 1;
} else {
l5ErrorCodeRetryIndex = l5ErrorCodeRetryIndex + 1;
}
}
if (retryIndex > this.maxRetryTimes) {
throw new IOException(e);
} else {
++retryIndex;
}
}
}
}
Expand Down

0 comments on commit 26f29ec

Please sign in to comment.