You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "zeroflag (via GitHub)" <gi...@apache.org> on 2023/03/23 15:03:25 UTC

[GitHub] [knox] zeroflag commented on a diff in pull request #742: KNOX-2890 - Prevent non-idempotent requests from failing over

zeroflag commented on code in PR #742:
URL: https://github.com/apache/knox/pull/742#discussion_r1146336678


##########
gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/dispatch/ConfigurableHADispatch.java:
##########
@@ -61,18 +61,20 @@ public class ConfigurableHADispatch extends ConfigurableDispatch {
 
   protected static final HaDispatchMessages LOG = MessagesFactory.get(HaDispatchMessages.class);
 
-  private int maxFailoverAttempts = HaServiceConfigConstants.DEFAULT_MAX_FAILOVER_ATTEMPTS;
+  protected int maxFailoverAttempts = HaServiceConfigConstants.DEFAULT_MAX_FAILOVER_ATTEMPTS;
 
-  private int failoverSleep = HaServiceConfigConstants.DEFAULT_FAILOVER_SLEEP;
+  protected int failoverSleep = HaServiceConfigConstants.DEFAULT_FAILOVER_SLEEP;
 
-  private HaProvider haProvider;
+  protected HaProvider haProvider;
 
   private static final Map<String, String> urlToHashLookup = new HashMap<>();
   private static final Map<String, String> hashToUrlLookup = new HashMap<>();
+  protected static final List<String> idempotentRequests = Arrays.asList("POST", "PATCH", "CONNECT");

Review Comment:
   Aren't these the `non` idempotent requests?



-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org