You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2004/09/10 17:28:48 UTC
Re: cvs commit: httpd-2.0/modules/proxy proxy_balancer.c
proxy_util.c mod_proxy.h
You introduce a race between multiple listening threads attempting
to initialize the scoreboard together. post_config or child_init
should solve the problem, no?
At 03:16 AM 9/10/2004, mturk@apache.org wrote:
>mturk 2004/09/10 01:16:26
>
> Modified: modules/proxy proxy_balancer.c proxy_util.c mod_proxy.h
> Log:
> Move the shared scoreboard data initization to the balancer module.
> The initialization is done like for the worker, on first request.
> This is done because during config phase we don't have a scoreboard
> to allocate from. Thanks to Chritian von Roques for spotting that.
>
> @@ -273,6 +343,10 @@
> if (!(*balancer = ap_proxy_get_balancer(r->pool, conf, *url)))
> return DECLINED;
>
> + /* Initialize shared scoreboard data */
> + if (!((*balancer)->status))
> + init_runtime_score(conf->pool, *balancer);
> +
> /* Step 2: find the session route */
>
> runtime = find_session_route(*balancer, r, &route, url);
Re: cvs commit: httpd-2.0/modules/proxy proxy_balancer.c proxy_util.c
mod_proxy.h
Posted by Mladen Turk <mt...@apache.org>.
William A. Rowe, Jr. wrote:
> You introduce a race between multiple listening threads attempting
> to initialize the scoreboard together. post_config or child_init
> should solve the problem, no?
>
Yes, I see that (now that you've mentioned :)).
I'll use the child_init to initialize all balancers.
Regards,
MT.