Re: Avoid duplicate peers for no-direct and maybe-direct forwarding

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 10 May 2012 13:57:27 +1200

On 10.05.2012 04:14, Alex Rousskov wrote:
> On 04/28/2012 10:50 PM, Alex Rousskov wrote:
<snip>
>>
>> 2. Change lower-level peerAddFwdServer() so that only new servers
>> are
>> added even if the higher level code tries to add duplicates; the
>> "same
>> server" comparison can be done using server address (including port)
>> and
>> disregarding the hierarchy code. This will fix my use case, but I am
>> not
>> 100% sure whether skipping some servers would break some
>> configurations
>> because those servers have "more important" hierarchy code, even
>> though
>> they are added later/last.
>>
>> Should I do #2? Is there a better option?
>
> FWIW, the "duplicate peer addresses" problem does not exist in Squid
> 2.7
> which indirectly supports my assumption that this is a bug rather
> than a
> feature.
>

Yes. I had though Henrik fixed it in 3.0 as well, but apparently not.

FWIW the "more important" hierarchy types are added first by the
generic Foo algorithm lookup ordering. So no need to worry about that in
the low level add function.

Amos
Received on Thu May 10 2012 - 01:57:31 MDT

This archive was generated by hypermail 2.2.0 : Thu May 10 2012 - 12:00:05 MDT