In conditions of very low disk space available, or ENOSPC, the datastore misbehaves grossly:
- sometimes corrupts the index, and won't rebuild it, "hiding" valid entries from the user - if you edit an entry metadata, it will corrupt the whole entry - attempts at deleting entries fail, so users cannot get out of ENOSPC This patchseries is an attempt at fixing these issues. The overall user experience is not perfect when we hit ENOSPC -- metadata edits are ignored, sometimes the datastore process goes away (so the Journal is not responsive until a new datastore process is spawned and ready). However, it behaves sanely: - testing this code I do not lose ds entries when editing them - I can remove entries correctly, even at ENOSPC, effectively freeing disk space - the index works even at ENOSPC, though it may take slower for the system to start in those cases where we do rebuild it - the index recovers gracefully on restart when there is free disk space Martin Langhoff (7): Add ds_clean flag to trigger index rebuilds #2095, #2317 Remove invalid/corrupt on-disk entries #2317 metadatastore: store/change files on disk defensively #2317 metadatareader: ignore ".hidden" files indexstore: exit on _flush() errors, work on tmpdir datastore: make delete() more reliable, log properly datastore: handle low-disk and ENOSPC conditions gracefully src/carquinyol/datastore.py | 142 +++++++++++++++++++++++++++++++++------ src/carquinyol/indexstore.py | 52 ++++++++++---- src/carquinyol/metadatareader.c | 7 +- src/carquinyol/metadatastore.py | 51 +++++++++----- 4 files changed, 197 insertions(+), 55 deletions(-) -- 1.7.10.4 _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel