[PATCH RFC?] Compactification support

Ben Gamari bgamari.foss at gmail.com
Mon Aug 20 08:31:41 PDT 2012


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



More information about the notmuch mailing list