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
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:
* 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
* 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
int lbset; /* load balancer cluster set */
apr_interval_time_t ping_timeout;
char ping_timeout_set;
+ char retry_set;
};
/*
}
/* 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 */