[PATCH] lib/database.cc: use flush Xapian method instead of commit

David Bremner david at tethera.net
Fri Oct 28 07:56:30 PDT 2011


From: David Bremner <bremner at debian.org>

Apparently the method was renamed in Xapian 1.1.0 but the old method
name will stay around for a while. It seems better to stick with the
old name to make notmuch compile with older versions of Xapian, at
least for now.
---
 lib/database.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/database.cc b/lib/database.cc
index e77fd53..5440df2 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1030,7 +1030,7 @@ notmuch_database_end_atomic (notmuch_database_t *notmuch)
 	 * However, we rely on flushing to test atomicity. */
 	const char *thresh = getenv ("XAPIAN_FLUSH_THRESHOLD");
 	if (thresh && atoi (thresh) == 1)
-	    db->commit ();
+	    db->flush ();
     } catch (const Xapian::Error &error) {
 	fprintf (stderr, "A Xapian exception occurred committing transaction: %s.\n",
 		 error.get_msg().c_str());
-- 
1.7.5.4



More information about the notmuch mailing list