lymerin commented on code in PR #7777:
URL: https://github.com/apache/shenyu/pull/7777#discussion_r4303440766


##########
shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/FixedRetryStrategy.java:
##########
@@ -56,15 +61,22 @@ public FixedRetryStrategy(final AbstractHttpClientPlugin<R> 
httpClientPlugin) {
      * @return Response Mono object after retry processing
      */
     public Mono<R> execute(final Mono<R> response, final ServerWebExchange 
exchange, final Duration duration, final int retryTimes) {
-        Retry retrySpec = initFixedBackoff(exchange, retryTimes);
-        Duration totalTimeout = RetryTimeoutUtils.totalTimeout(duration, 
retryTimes, Duration.ofSeconds(2));
-        return response.retryWhen(retrySpec)
+        Mono<R> retriedResponse;
+        if 
(RetryEnum.FAILOVER.getName().equals(exchange.getAttribute(Constants.RETRY_STRATEGY)))
 {
+            retriedResponse = new 
DefaultRetryStrategy<>(httpClientPlugin).executeFailover(response, exchange, 
duration, retryTimes, BACKOFF,

Review Comment:
   Thanks for merging!
   
   Just to clarify, the single-upstream fallback discussed in the review hasn't 
been implemented in this PR yet.
   
   I had planned to address it tomorrow as mentioned earlier. Would you prefer 
a follow-up PR implementing option 2, or do you consider the current failover 
behavior acceptable as-is?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to