Re: assert(e->mem_status == NOT_IN_MEMORY) versus TCP_MEM_HIT.

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 26 Sep 2009 18:37:30 +1200

Henrik Nordstrom wrote:
> fre 2009-09-25 klockan 23:40 +1200 skrev Amos Jeffries:
>> This is the current blocker on trunk...
>>
>> Attempting to swap-in an object which is already in memory and on disk.
>
> Right, there is a timing race uncovered by the swapin changes.
>
> 1. store client created and type set to disk client.
>
> [some time may pass]
>
> 2. First doCopy call triggers the start of the swapin.
>
>
> I see two ways of fixing this:
>
> a) Move the swapin start to 1.
>
> b) Make store clients automatically switch from disk to mem type if the
> object is found to be already swapped in in doCopy
>
> or alternatively
>
> c) Remove the assert. It's harmless.

Something seems a bit weird to me there...

(c) being harmless race condition?

Surely its only harmless if we do (b) by changing the assert to a
self-fix action?

If you are right, I'd prefer (b) anyway.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE19
   Current Beta Squid 3.1.0.13
Received on Sat Sep 26 2009 - 06:37:36 MDT

This archive was generated by hypermail 2.2.0 : Sat Sep 26 2009 - 12:00:09 MDT