[Sugar-devel] Datastore index corruption

Bernie Innocenti bernie at codewiz.org
Sun Jun 20 10:20:45 EDT 2010


El Sun, 20-06-2010 a las 01:10 +0000, Aleksey Lim escribió:
> There were patches on bugs.sl.o that are using fsync on every ds change
> (file based fsync) to make journal more robust. I'm personally not happy
> with this method. And maybe most of journal issues with "lost" data could
> be effectively solved just by keeping index up-to-date.

I agree, syncing too often would be overkill.


> So, what about using dirty flag. For example:
> 
> * before any ds changes, set dirty flag (well, in fs as well)
> * process several ds requests
> * in some time (some minutes), remove dirty flag and do sync on entirely fs
> * expose sync ds method to make sync directly e.g. on Reboot button click

To implement the dirty flag, we could recycle the index_updated flag
file: we could remove it before performing any change and restore it
when we're done updating the journal.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/



More information about the Sugar-devel mailing list