[mnet-devel] Ickle me, pickle me, tickle me too...
Wes Felter
wesley at felter.org
Fri Aug 8 22:42:52 BST 2003
On Fri, 2003-08-08 at 07:23, Zooko wrote:
> > I question Zooko's suggestion of overwriting the checkpoint file
> > in-place; I wonder what could happen during a crash. Maybe it's better
> > to write the checkpoint to a new file, fsync it, and then rename it
> > over the old one.
>
> That would be guarantee that either the old or the new version is in place
> (assuming certain guarantees from the underlying filesystem), right?
Right.
> But we still have the possibility that it is the old version, which can cause
> problems.
As I see it, you have two choices:
Rewrite the index in-place, allowing it to become hopelessly corrupted
in a crash.
Write the index atomically, allowing the possibility that after a crash
you might see the old version.
--
Wes Felter - wesley at felter.org - http://felter.org/wesley/
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel
More information about the Mnet-devel
mailing list