From: Norbert N. <Nor...@gm...> - 2004-09-30 08:27:49
|
On Thursday 30 September 2004 09:56, Francesc Alted wrote: > A Dijous 30 Setembre 2004 09:32, Norbert Nemec va escriure: > > Even though: I would strongly hope that it is not necessary. Does > > h5file.close() do anything on the file but flush() it and then close the > > physical file? In other words: is there any danger of file corruption if > > the python program is just shut down cold without a chance to save > > anything? Like - when the file is written via NFS and the computer > > running the program is switched off hard? > > I'm not completely sure, but muy guts say that this would not be a problem. > If your program crashes (or is shut down) and there are buffers that are > not written yet, then the file will miss this information, but will not get > corrupted. > > The only problem may appear if you shut down the program *during* a write > process. In that case I guess you will end with a corrupted file, as there > are no provision of I/O transactions yet. OK, that leaves me two specific questions: * Does pytables ever initiate writes except in explicit flush() and close() commands? * Are the elementary operations of the underlying hdf5 library atomic? I.e.: If I shut down the program in the middle of a pytables write action, might the resulting file be fundamentally corrupted at the hdf5 level, or would the corruption be well localized and reparable? All leading to the third question: * Might there be some simple way to make a set of changes atomic? Even if that means restricting the use of pytables? Ciao, Nobbi -- _________________________________________Norbert Nemec Altdorfer Str. 9a ... D-93049 Regensburg Tel: 0941 / 2009638 ... Mobile: 0179 / 7475199 eMail: <No...@Ne...> |