[PATCH RFC?] Compactification support

Subject: [PATCH RFC?] Compactification support

Date: Mon, 20 Aug 2012 11:31:41 -0400

To: notmuch@notmuchmail.org

Cc:

From: Ben Gamari


Here is a small patchset adding support for database compaction when supported
by Xapian. Here I add a function which both compacts and closes the database.
This is due to it being not entirely clear whether one is allowed to compact
the database while it is being held open for read/write.


Since it is nice to be able to hold the read/write lock while compacting, I
close the database only after the compaction has finished which Xapian seems to
be fine with. That being said, the database is moved after compaction, so it seems appropriate to lump compaction in with closing the database.

Lastly, I wasn't entirely sure whether/how Xapian's status messages should be
presented to the user. At the moment I simply spit them out on stderr. Perhaps
I should just pass a callback to notmuch_database_close_compact and leave this
to the caller?

Cheers,

- Ben


Thread: