]> granicus.if.org Git - apache/commitdiff
* Retry worker chosen by client supplied route / redirect worker if it
authorRuediger Pluem <rpluem@apache.org>
Tue, 27 Jun 2006 12:05:43 +0000 (12:05 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 27 Jun 2006 12:05:43 +0000 (12:05 +0000)
  is in error state before sending "Service Temporarily Unavailable".

PR: 38962
Submitted by: Christian Boitel <cboitel lfdj.com>
Reviewed by: rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417443 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_balancer.c

diff --git a/CHANGES b/CHANGES
index 8ed8c4a5c7143abc39dc72f06a210db8bfb7ec90..00873f83011c5c2c1149847f3615ecd2ad831618 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_proxy_balancer: Retry worker chosen by route / redirect worker if
+     it is in error state before sending "Service Temporarily Unavailable".
+     PR 38962. [Christian Boitel <cboitel lfdj.com>]
+
   *) mod_proxy_balancer: Add information about the route, the sticky session
      and the worker used during a request as environment variables. PR 39806.
      [Brian <brectanu gmail.com>]
index e76dd1cfbcb375f6d9a77f7b606eb402bde205a7..b026be71ffbea01bea296662bf5fb999ccd4f3d1 100644 (file)
@@ -219,18 +219,39 @@ static proxy_worker *find_session_route(proxy_balancer *balancer,
          */
         worker = find_route_worker(balancer, *route);
         if (worker && !PROXY_WORKER_IS_USABLE(worker)) {
-            /* We have a worker that is unusable.
-             * It can be in error or disabled, but in case
-             * it has a redirection set use that redirection worker.
-             * This enables to safely remove the member from the
-             * balancer. Of course you will need a some kind of
-             * session replication between those two remote.
+            /*
+             * If the worker is in error state run
+             * retry on that worker. It will be marked as
+             * operational if the retry timeout is elapsed.
+             * The worker might still be unusable, but we try
+             * anyway.
              */
-            if (*worker->s->redirect)
-                worker = find_route_worker(balancer, worker->s->redirect);
-            /* Check if the redirect worker is usable */
-            if (worker && !PROXY_WORKER_IS_USABLE(worker))
-                worker = NULL;
+            ap_proxy_retry_worker("BALANCER", worker, r->server);
+            if (!PROXY_WORKER_IS_USABLE(worker)) {
+                /*
+                 * We have a worker that is unusable.
+                 * It can be in error or disabled, but in case
+                 * it has a redirection set use that redirection worker.
+                 * This enables to safely remove the member from the
+                 * balancer. Of course you will need some kind of
+                 * session replication between those two remote.
+                 */
+                if (*worker->s->redirect)
+                    worker = find_route_worker(balancer, worker->s->redirect);
+                /* Check if the redirect worker is usable */
+                if (worker && !PROXY_WORKER_IS_USABLE(worker)) {
+                    /*
+                     * If the worker is in error state run
+                     * retry on that worker. It will be marked as
+                     * operational if the retry timeout is elapsed.
+                     * The worker might still be unusable, but we try
+                     * anyway.
+                     */
+                    ap_proxy_retry_worker("BALANCER", worker, r->server);
+                    if (!PROXY_WORKER_IS_USABLE(worker))
+                        worker = NULL;
+                }
+            }
         }
         return worker;
     }