tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: svn commit: r609757 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_service.h common/jk_util.c iis/jk_isapi_plugin.c netscape/jk_nsapi_plugin.c
Date Mon, 07 Jan 2008 23:46:33 GMT
Mladen Turk schrieb:
> wrote:
>> Author: rjung
>> Date: Mon Jan  7 11:41:44 2008
>> New Revision: 609757
>> URL:
>> Log:
>> Remove "retries" element from service struct, because
>> we don't use it.
> I don't get it.
> This copy was intentionally made so we can pass the
> retries from lb to each worker, meaning that if you
> set the retries to the lb it'll be propagated to each
> worker that is member of this lb, allowing to set the
> retries only once.

But that's not what the code does, see below. The retries in the lb and 
in the members serve a different and independant purpose. Of course it 
would have been nice to give those different names and then inherit from 
lb to the members, but we can't change the meaning of the parameters 
now. See details below.

> Can you explain this patch?

Yes. We had "retries" in three places:

A) in the service struct
B) in the lb_worker struct
C) in the jk_worker struct

Ad A)

The element retries in the service struct was set in the web server 
plugins to JK_RETRIES, but never read. It was not used in any place.

Ad B)

The retries in the lb_worker is the number of times we try to get and 
endpoint from the cache. For Apache with default settings, this should 
be noop, because we have as many endpoints as we have threads, for IIS 
and netscape, this will wait a bit and retry to get a free endpoint.

The value gets set during lb initialization and is read from the, attribite retries of the lb worker itself.

Ad C)

The retries in jk_worker is set in all types of workers (status, jni, 
ajp12, ajp13, ajp14) but only used in ajp13 and ajp14. Therefore I moved 
it from jk_worker to ajp_worker, because that's a good fit.

The value gets set during ajp worker initialization rom the retries 
attribute of the ajp worker (or lb member). It is independent from the 
retries on any lb.

It gets used, when the service call of the worker gets an error, e.g. if 
all connections are dead.

Does that make sense for you?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message