notmuch new atomicity and eager maildir flag synchronization

Subject: notmuch new atomicity and eager maildir flag synchronization

Date: Tue, 8 Feb 2011 00:19:52 -0500

To: notmuch@notmuchmail.org

Cc:

From: Austin Clements


I've modified notmuch new so it can now be interrupted without risking
database consistency or losing track of messages (and by "interrupted"
I mean real interruptions like kill -9 or someone tripping over the
power cord).  This change also restructures the code a bit to perform
eager maildir flag synchronization, and, as a result, every message
add or remove is now an isolated operation that can be performed in
its own little Xapian transaction, so notmuch new won't loose much
progress if it does get interrupted in the middle of a big import.

I'm still ruminating over the patches, but if you'd like to try it
out, it's on the atomic-new-hack branch at
  http://awakening.csail.mit.edu/git/notmuch.git/
(Be warned, since this is a hack branch, I may rebase it).

On my mailbox, performance is essentially the same as master.  It may
prove more beneficial on spinning rust because it performed 23% fewer
I/O operations (7,494,864 versus 12,582,072 reads; 13,550,272 versus
14,489,744 writes).

Thread: