Data corruption
Sandor Bodo-Merle
sbodomerle at gmail.com
Wed Jun 17 14:59:15 MDT 2009
On Wed, Jun 17, 2009 at 2:23 AM, Robby Stephenson <robby at periapsis.org>wrote:
> On Sunday 14 June 2009, Sandor Bodo-Merle wrote:
> > Tellico does not check the return values of KZip::writeFile in
> > tellicozipexporter. The question is how to handle a failure?
>
> That's just the temporary buffer. The writing to disk takes place in the
> FileHandler class which uses the KSaveFile class, which is supposed to
> guarantee atomically (all or nothing). Your results say that it is not
> working.
>
I tried your latest checkin with saveFile.flush() - but if there is not
enough space the result is that Tellico will call flush() so it will not
handle events for several seconds (if you have enough dirty buffers) - but
still writes a shorter (corrupt) zip file without any warning.
As this results is silent data loss - i think this is pretty serious. It
happened to me that in one session i saved it twice - so first i get a good
backup, *.tc~ with wrong tc file, but at the second save - i got even the
backup corrupted ... so goodbye data .... (having external backups always
help ...)
Ill try to investigate this a bit more on weekend; and thx for the
clarifications about the save file codepath.
> From the API doc, maybe I need to call saveFile.flush() before callign
> saveFile.finalize(). I'm not sure, though.
>
This probably is related to the ext4 file corruption bugs which showed up
under KDE4 recently .....
>
> But the intent is to have the check for file system space in there.
>
So as i wrote it above - this does not happen unfortunately.
Sanyi
>
> Robby
>
> > On Sun, Jun 14, 2009 at 6:58 PM, Sandor Bodo-Merle
> <sbodomerle at gmail.com>wrote:
> > > Hi Robby,
> > >
> > > with current svn HEAD you will get silent data corruption when there is
> > > no more space on the file system to write the new *.tc file.
> > > The size of the tc file will be much smaller, and tellico is not able
> > > to open it on the next start.
> > >
> > > br
> > > Sanyi
>
>
>
> _______________________________________________
> tellico-users mailing list
> tellico-users at forge.novell.com
> http://forge.novell.com/mailman/listinfo/tellico-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://forge.novell.com/pipermail/tellico-users/attachments/20090617/00897257/attachment.html
More information about the tellico-users
mailing list