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

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 27 Sep 2009 12:55:53 +1300

Henrik Nordstrom wrote:
> lör 2009-09-26 klockan 18:37 +1200 skrev Amos Jeffries:
>
>> Something seems a bit weird to me there...
>>
>> (c) being harmless race condition?
>
> It is harmless, the only ill effect is that the swap file is opened when
> it does not need to be, just as happens if the request had arrived a few
> ms before.
>
> clients starting when an object is not fully in memory always opens the
> disk object to be sure they can get the whole response, even if it most
> times do not need to read anything from that on-disk object.
>
>> Surely its only harmless if we do (b) by changing the assert to a
>> self-fix action?
>
> The self-fix is already there in that the actual data will all be copied
> from memory. It's just that not all data was in memory when the request
> started (store client created) but then when doCopy was called the first
> time it was.
>
> Or at least that's my assumption on what has happened. To know for sure
> the object needs to be analyzed extracting expected size and min & max
> in-memory to rule out that it's not an object that has got marked
> erroneous as in-memory. But I am pretty sure my guess is right.
>
> Regards
> Henrik
>

Ah, okay gotcha.
So...
  (c) for people needing a quick patch.
  (b) to be committed (to meet 3.2 performance goals, saving uselsss
disk operations, etc etc).

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 - 23:56:00 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 28 2009 - 12:00:05 MDT