« Return to Thread: Data corruption

Re: Data corruption

by Sandor Bodo-Merle :: Rate this Message:

Reply to Author | View in Thread



On Wed, Jun 17, 2009 at 2:23 AM, Robby Stephenson <robby@...> 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@...>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@...
http://forge.novell.com/mailman/listinfo/tellico-users


_______________________________________________
tellico-users mailing list
tellico-users@...
http://forge.novell.com/mailman/listinfo/tellico-users

 « Return to Thread: Data corruption