[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Safe File Update (atomic)

On Thu, Jan 6, 2011 at 7:59 PM, Enrico Weigelt <weigelt@metux.de> wrote:
> * Olaf van der Spek <olafvdspek@gmail.com> schrieb:
>> A transaction to update multiple files in one atomic go?
> Yes. The application first starts an transaction, creates/writes/
> removes a bunch of files and then sends a commit. The changes
> should become visible atomically and the call returns when the
> commit() is completed (and written out to disk). If there're
> conflics, the transaction is aborted w/ proper a error code.
> So, in case of a package manager, the update will run completely
> in one shot (from userland view) or not at all.
> I could live with:
> a) relatively slow performance (commit taking a second or so)
> b) abort as soon as an conflict arises
> c) files changed within the transaction are actually new ones
>   (sane package managers will have to unlink text files instead
>   simply overwriting nevertheless)

That would be nice, but the single file case appears to be difficult
enough already. So we might want to focus on that first.


Reply to: