On Tue, October 24, 2006 3:46 pm, Joe Orton wrote:

> That's not the point - the scary complexity of all this is that it's
> become a multi-process synchronisation problem - what do you do when the
> writing process SIGSEGVs or hangs?  You're left with N processes hanging
> around indefinitely waiting for data.

Why indefinitely? The same as if the origin server disappears or hangs -
you time out.

> Or similarly, how do you tell the
> difference between a stale temp file left by a previous process and an
> actively-being-written one?

At worst a force reload will invalidate the entry - standard procedure for
current caches.

At best if a follow process suspects the writer has gone away, try and
open the cached file with an exclusive write access - if that succeeds,
the writer has gone away, invalidate the entry. Wire this up to the
timeout above.

Regards,
Graham
--


Reply via email to