Re: [Squid Bug 1548] - TCP_REFRESH_HIT/TCP_REFRESH_MISS do not update Squid's opinion of an object's freshness

From: Doug Dixon <doug.dixon@dont-contact.us>
Date: Tue, 2 May 2006 10:22:47 +1200

On 2 May 2006, at 03:40, Henrik Nordstrom wrote:

>>
>> We could have a new code: TCP_REFRESH_FAIL_HIT which would be good
>> because it alerts admins about their origins serving errors... but it
>> does add to an already big list.
>
> Looking in the code.. it's already there and used for a few cases
> where
> refreshes was unsuccessful. So continue using it sounds like a good
> idea.

Ah so it is! My eyes must have jumped over that line.
It's used twice in client_side_reply.cc.

>
>> On the other hand... is a HIT something we don't have to query the
>> origin for? If so they should all be misses:
>>
>>
>> TCP_REFRESH_UNMODIFIED <- origin said 304
>> TCP_REFRESH_MODIFIED <- origin said non-error, non-304
>> TCP_REFRESH_ERROR <- origin said error
>
> Perhaps. It's kind of a FAQ to explain these...

It's probably a FAQ because currently everything is lumped into HIT
and MISS - and these terms are irrelevant to refreshes. It's wrong to
say a refresh can ever be a HIT, or that a MISS during a refresh is
somehow undesirable. The thing to know about a refresh is what the
origin said.

>
>> I don't mind which way we go on this, it's pretty minor compared to
>> the actual fix :)
>
> Lets try to separate the two issues. First fix the behaviour, then
> separately consider if the log codes should be changed.

Yep. This mail is just about the logging (behaviour being discussed
in other posts).

>
> There is more changes to the log codes which may be interesting, but
> changing these should not be taken lightly as it has direct
> implications
> on existing log processing tools who have already learnt the existing
> terminology (at least some.. some do get it slightly wrong sometimes,
> but refreshes is by nature "odd" in terms of hit/miss)

Understood about breaking the external interface. (Although it might
serve to highlight which third party tools are actively used :-P)

However, the more I think about it, the more it feels like the
logging issue is not minor. It's actually a glaring bug (albeit
informational): we should never use the words HIT or MISS with a
REFRESH. These are all mutually exclusive.

My inclination in this case is to err on the side of clarity and
correctness at the expense of breaking tools, especially since we're
PRE.

Thoughts?

Cheers
Doug
Received on Mon May 01 2006 - 19:20:28 MDT

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