]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r451575, r451582 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 18 Sep 2007 13:32:28 +0000 (13:32 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 18 Sep 2007 13:32:28 +0000 (13:32 +0000)
Enable retry=0 for the worker.
This allows to have an option to always retry
the workers in error state instead using a
specified time.

Move new struct member to the end of the struct,
so we can keep the compatibility.
Submitted by: mturk
Reviewed by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@576910 13f79535-47bb-0310-9956-ffa450edef68

STATUS
include/ap_mmn.h
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy.h
modules/proxy/proxy_util.c

diff --git a/STATUS b/STATUS
index e3f0610a5b3f5acf21aec0aee6ee135b7690c95d..c354877d3166faebe768a842696344bb00729517 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -79,16 +79,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * mod_proxy: Enable retry=0 for the worker.
-      Trunk version of patch:
-         http://svn.apache.org/viewvc?view=rev&revision=451575
-         http://svn.apache.org/viewvc?view=rev&revision=451582
-      Backport version for 2.2.x of patch:
-         Trunk version of patch works but requires
-           http://people.apache.org/~jim/patches/retry_set-mmn.patch
-         in addition for MMN bump.
-      +1: jim, niq, rpluem
-
     * mod_proxy_ajp: Differentiate within AJP between GET and HEAD requests.
       PR 43060
       Trunk version of patch:
index 95871f1b4b3a82010a39acb7e56af93046b2b96f..c9d0be2ca086adb37fd4ecc7394ef5b1edd48bb3 100644 (file)
  * 20051115.4 (2.2.4)  Added ap_get_server_banner() and
  *                         ap_get_server_description() (minor)
  * 20051115.5 (2.2.5)  Added ap_mpm_safe_kill() (minor)
+ * 20051115.6 (2.2.7)  Added retry_set to proxy_worker (minor)
  *
  */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20051115
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 5                     /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 6                     /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index 0749a7eb729d84e4ccfe0f6b43d411b398a4143f..d55ff24400fbf9184058d8f11ecbabfa9925c54a 100644 (file)
@@ -85,9 +85,10 @@ static const char *set_worker_param(apr_pool_t *p,
          * in error state, it will be retried after that timeout.
          */
         ival = atoi(val);
-        if (ival < 1)
-            return "Retry must be at least one second";
+        if (ival < 0)
+            return "Retry must be a positive value";
         worker->retry = apr_time_from_sec(ival);
+        worker->retry_set = 1;
     }
     else if (!strcasecmp(key, "ttl")) {
         /* Time in seconds that will destroy all the connections
index 8e2c5066c2273cb26470898c71ecac1e022e0c81..f2c89747887728742b2fd1dd9ec0df3cb225eef1 100644 (file)
@@ -330,6 +330,7 @@ struct proxy_worker {
     int             lbset;      /* load balancer cluster set */
     apr_interval_time_t ping_timeout;
     char ping_timeout_set;
+    char            retry_set;
 };
 
 /*
index 05ec5da56db6975f48ca28cf2122a25e1883ca39..8141d1b78007c3d18bbc64abe58b560ecd583519 100644 (file)
@@ -1722,7 +1722,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
     }
 
     /* Set default parameters */
-    if (!worker->retry) {
+    if (!worker->retry_set) {
         worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
     }
     /* By default address is reusable */