On 30 Jun 2004, at 19:01, Mike Chamberlain wrote:

On 29 Jun 2004, at 22:15, Matt Sergeant wrote:

Use atomic move in your file updates. Write to somewhere on the same filesystem (mount point) and move the file (or hard link and unlink the original).

Though in that case, the update of the file itself would be atomic (ie, you won't get a partial file being
read), but there is still a potential for another webserver to read the old (stale) file,
before the new file is created. At this point you need to consider if that is an issue, or
if you need to maybe write your own provider which does locking.

I'm confused. It sounds like you're suggesting the other webserver might be able to read the new file before the new file is created.


There's no race condition here, unless you think content should be uploaded before it's been written.

Matt.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to