Writing a buffer to any fs is not guaranteed to be atomic, you might
end up with partial/corrupt RSML with all kinds of failures including
running out disk space. The usual way is to:
1. write everythiing to a tmp file and sync
2. if 1. succeeds, rename tmp file to the final file and sync
The assumption is that rename is atomic, which seems to be true on
posix fs (linux, bsd, solaris etc.) and most other fs, especially when
the final filename is shorter than the tmp file name.
__Luke
On Sun, Sep 6, 2009 at 8:26 PM, Doug Judd<
do...@zvents.com> wrote:
>
http://github.com/nuggetwheat/hypertable/commit/3b2bf875ed31d5ce61b55ad6758a5c2803ff5f4c
>
> - Doug
>
>
> >
>