Re: [patch] refresh bugs

From: Doug Dixon <doug.dixon@dont-contact.us>
Date: Tue, 2 May 2006 11:08:35 +1200

On 2 May 2006, at 05:08, Henrik Nordstrom wrote:

> mån 2006-05-01 klockan 22:46 +1200 skrev Doug Dixon:
>> Hi
>>
>> I've written a patch that is supposed to fix several problems with
>> how squid3 refreshes stale entries.
>>
>> http://www.squid-cache.org/bugs/show_bug.cgi?id=1548
>>
>> The following bugs are targeted:
>> Bug 1548 - Refresh where origin replies 304: cache is not updated,
>> future requests will still hit origin
>
> Part of "cache is not updated" is also bug #7...

Ah yes. I think 1548 and 7 are the same issue.

>
>> Specific things I'd like comment on:
>> 1. handleIMSGiveClientUpdatedOldEntry() used to HTTPMSGLOCK and
>> HTTPMSGUNLOCK the request. Is it okay to remove this? (I'm awaiting
>> some feedback from Duane on this one)
>
> The whole construct with explicit lock/unlock is questioned, but as a
> rule of thumb anything going into persistent structures such as
> StoreEntry (and it's references, i.e. MemObj) should keep a lock, even
> if temporary. This to allow audits of the lock management.

Duane has come back:

On 2 May 2006, at 09:34, Duane Wessels wrote:
It is possible that the calls between LOCK and UNLOCK in this
case don't even need old_entry->mem_obj->request to be set.
If you can prove that then certainly this function
becomes a lot simpler.

So I think (1) is okay.

>
>> 2. handleIMSGiveClientUpdatedOldEntry() used to set old_entry-
>>> timestamp to squid_curtime. Was this in fact correct?
>
> Yes, but to be correct Bug #7 also needs to be solved and at that time
> the object time management reinvestigated. We derive quite a bit from
> the specs today in how we handle time drift.

Not sure I follow... unless I'm mistaken, I think this fixes Bug #7

I guess the question is whether the call to storeTimestampsSet
(old_entry) sets the timestamp correctly or not in this instance, and
therefore whether we need to overwrite this immediately afterwards
(as happens at present).

Is there more object time management stuff that needs to be fixed?

Cheers
D
Received on Mon May 01 2006 - 17:08:46 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:04 MDT