httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r1067269 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.c mod_proxy.h mod_proxy_balancer.c proxy_util.c
Date Mon, 07 Feb 2011 12:58:26 GMT

On Feb 6, 2011, at 9:02 AM, Ruediger Pluem wrote:
>>     /* Step 3.5: Update member list for the balancer */
>>     /* TODO: Implement as provider! */
>> -    /* proxy_update_members(balancer, r, conf); */
>> +    ap_proxy_update_members(*balancer, r->server, conf);
> 
> Don't we need a lock here as well or better simply doing a lock in ap_proxy_update_members?
> 

I will be honest: I haven't really added in the required
locking cases yet... so there are a few places where we should
lock, but we don't yet.

>> +    for (index = 0; index < b->max_workers; index++) {
>> +        int found;
>> +        apr_status_t rv;
>> +        if ((rv = storage->dptr(b->slot, index, (void *)&shm)) != APR_SUCCESS)
{
>> +            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_dptr failed");
>> +            return APR_EGENERAL;
>> +        }
>> +        if (!shm->hash)
>> +            continue;
> 
> Can't we do a break here?

Not really, because in the future we will be, when we
delete members, creating "holes" in the inuse array, and
so we will need to go thru all the available slots
to account for those.


Mime
View raw message