Tomi Ollila writes: > On Tue, Nov 05 2013, David Bremner wrote: > >> Jani Nikula writes: >> >>> Hi all, this is v2 of [1], incorporating compact related patches from >>> David, some changes from David's review, some new patches, man page >>> update, test update. >>> >>> Cheers, >>> Jani. >> >> Aside from the one quibble that I already sent seperately, the first 8 >> patches look OK to me. I have no technical objections to the last 3, but >> since the change the UI, I'd like to wait a bit for more input from >> other people. > > > The whole series looks OK to me. The only thing I'm, a bit worried about > what happens is I Ctrl-C compaction at any state. Is it possible that I > end up with corrupted database ? Someone may accidentally execute > notmuch compact -- for example by picking the command from history. > You should in principle never end up in a situation where the original database is corrupted. Xapian's Compactor interface reads from the existing database and writes out the compacted database to a new directory. The notmuch compact command keeps the original database in place until the last possible moment. When the compacted database is completely constructed it, deletes or moves the old database out of the way and then moves the new database into place. The worst thing that could happen is that you manage to interrupt the process between deleting the old database and moving the new one into place (a very small window). In this case you'd simply need to move the new database into place manually (although you'd need to figure out where the compacted database is located). Cheers, - Ben