Changes between Initial Version and Version 1 of Ticket #1425, comment 7


Ignore:
Timestamp:
2011-08-04T03:44:27Z (14 years ago)
Author:
davidsarah
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1425, comment 7

    initial v1  
    44> If you use [http://twistedmatrix.com/documents/current/api/twisted.python.filepath.FilePath.html#setContent FilePath.setContent] then your code can be simple while having this behavior. In addition, on Windows it will write to a new file, delete the old file, move the new file into place. That should, if I understand correctly, guarantee that an uncoordinated reader will see one of (old file, new file, no file).
    55
    6 Currently if the node sees no file, the blacklist code will raise an exception (I think this will just fail the request rather than crashing the node). I suppose that fails safe, but it's still undesirable.
     6Currently if the node sees no file (after seeing one at startup), the blacklist code will raise an exception. (I think this will just fail the request rather than crashing the node.) I suppose that fails safe, but it's still undesirable.
    77
    88In any case, someone editing the file probably won't be using !FilePath. They might use an editor that does the atomic rename-into-place; it's not uncommon for editors to do that on Unix, but it's not good for usability to expect users to know whether their editor does that.