notmuch/lib
Carl Worth 98845fdbb2 Avoid database corruption by not adding partially-constructed mail documents.
Previously we were using Xapian's add_document to allocate document ID
values for notmuch_message_t objects.  This had the drawback of adding
a partially constructed mail document to the database. If notmuch was
subsequently interrupted before fully populating this document, then
later runs would be quite confused when seeing the partial documents.

There are reports from the wild of people hitting internal errors of
the form "Message ... has no thread ID" for example, (which is
currently an unrecoverable error).

We fix this by manually allocating document IDs without adding
documents. With this change, we never call Xapian's add_document
method, but only replace_document with either the current document ID
of a message or a new one that we have allocated.
2010-06-04 10:16:53 -07:00
..
database-private.h Avoid database corruption by not adding partially-constructed mail documents. 2010-06-04 10:16:53 -07:00
database.cc Avoid database corruption by not adding partially-constructed mail documents. 2010-06-04 10:16:53 -07:00
directory.cc Avoid database corruption by not adding partially-constructed mail documents. 2010-06-04 10:16:53 -07:00
index.cc Do not segfault on empty mime parts 2010-04-13 08:49:06 -07:00
libsha1.c libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00
libsha1.h libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00
Makefile Makefiles: Use .DEFAULT to support arbitrary targets from sub directories. 2010-01-06 10:32:06 -08:00
Makefile.local Add support for the Solaris platform 2010-06-03 18:17:03 -07:00
message-file.c Make Received: header special in notmuch_message_file_get_header 2010-04-26 14:44:06 -07:00
message.cc Avoid database corruption by not adding partially-constructed mail documents. 2010-06-04 10:16:53 -07:00
messages.c lib: Rename iterator functions to prepare for reverse iteration. 2010-03-09 09:22:29 -08:00
notmuch-private.h Avoid database corruption by not adding partially-constructed mail documents. 2010-06-04 10:16:53 -07:00
notmuch.h lib: Ensure notmuch_query_search_messages returns NULL on an exception. 2010-04-24 07:27:50 -07:00
query.cc lib: Ensure notmuch_query_search_messages returns NULL on an exception. 2010-04-24 07:27:50 -07:00
sha1.c Typsos 2009-11-18 03:21:36 -08:00
tags.c lib: Rename iterator functions to prepare for reverse iteration. 2010-03-09 09:22:29 -08:00
thread.cc Fix SEGV in _thread_cleanup_author if author ends with ', ' 2010-04-27 16:34:27 -07:00
xutil.c xutil: Implement xstrndup without relying on strndup. 2009-12-01 12:51:39 -08:00
xutil.h libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00