A Dimecres 12 Abril 2006 05:29, Andrew Straw va escriure:
> Hmm, the specific test I wrote (see below) fails also in pytables 1.1.1,
> but my memory is that my application was usually saved self-consistent
> files when it was unexpectedly terminated (which included Ctrl-C back

And your memory wasn't betraying you. I've systematically used your
script with PyTables 0.9, 1.0 and 1.1, and the last one where flushing
was working correctly was 1.0. After some digging, I've seen that, in
1.1 release, we commented out the flush action. We did that because by
that time, we had to force an opening (with the corresponding closing)
of the node in order to proceed with the flushing. Ivan discovered
this supposed inconsistency and, after some discussion, we (wrongly)
assumed that a flush against a closed node would do nothing.

The problem was that we were misunderstanding what the HDF5 H5Dclose
call does. H5Dclose effectively closes the node, but *without*
flushing the contents of its buffers. This is clearly very different
of what a typical filesystem close() call does and it was fooling us.
Anyway, this flaw has been solved in SVN trunk:

http://www.pytables.org/trac/changeset/1551

OTOH, by re-reading the H5Fflush docs more carefully
(http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5F.html#File-Flush), it seems
that it always flush *all* the buffers in the opened file, no matter
it has been called with a leaf ID, group ID or file ID parameter. So,
calling any of Leaf.flush(), Group.flush() or File.flush() has
effectively the same effect. In any case, I think it is good to leave
the .flush() calls as they are now in the hope that HDF5 will support
a selective data flushing in the future so that future versions of
PyTables can take advantage of this with no further API changes.

Well, thanks for being persistent enough in complaining ;-)

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to