[issue8604] Adding an atomic FS write API

Milko Krachounov report at bugs.python.org
Fri May 13 17:24:27 CEST 2011


Milko Krachounov <python at milko.3mhz.net> added the comment:

> Something's missing in all the implementations presented:
> to make sure that the new version of the file is available afer 
> a crash, fsync must be called on the containing directory after 
> the rename.

I upgraded my proposed approach to include dir fsync, and to do a copy when backing up instead of rename (is that good?)

http://bazaar.launchpad.net/~exabyte/blackherd/async-refactor/view/66/blackherd/misc.py#L498

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8604>
_______________________________________


More information about the Python-bugs-list mailing list