Re: Validation code.

From: Robert Collins <robert.collins@dont-contact.us>
Date: Fri, 1 Dec 2000 10:18:09 +1100

----- Original Message -----
From: "Duane Wessels" <wessels@squid-cache.org>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <squid-dev@squid-cache.org>
Sent: Friday, December 01, 2000 10:05 AM
Subject: Re: Validation code.

>
>
> On Sun, 26 Nov 2000, Robert Collins wrote:
>
> > I think there is a race in storeCleanup.
> >
> > I found a race between writing a swapfile and checking the files size while
> > doing the basic bits of the background checker. I think the same race could
> > occur in StoreCleanup.
> >
> > the Cleanup code iterations through the swap dirs, through each storeentry.
> > However new storeentries are able to be written as soon as the Log/Directory
> > have been parsed into memory.
> >
> > so the cleanup code could that calls doublecheck could call it on a new file
> > being written, thus causes a problem.
>
> Wait a minute.
>
> The being-written entry should have ENTRY_VALIDATED set, right?
>
> storeCleanup() skips entries with ENTRY_VALIDATED set.
>
> Duane W.
>
>

Maybe so... I reused storeCleanup as the basis for the simple background check. And it was consistently releasing everything I
downloaded if the background check hit it before SWAP_OUT occured. Perhaps VALIDATED is set when SWAP_OUT is? I'll go look.

Rob
Received on Thu Nov 30 2000 - 16:10:30 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:01 MST