[PATCH 1/2] lib: replace deprecated xapian call 'flush()' with 'commit()'

David Bremner david at tethera.net
Wed Oct 5 04:34:33 PDT 2016


This will make notmuch incompatible with Xapian before 1.1.0, which is
more than 6 years old this point.
---
 lib/database.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/database.cc b/lib/database.cc
index 4bfae01..f76c375 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1723,7 +1723,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->flush ();
+	    db->commit ();
     } catch (const Xapian::Error &error) {
 	_notmuch_database_log (notmuch, "A Xapian exception occurred committing transaction: %s.\n",
 		 error.get_msg().c_str());
-- 
2.9.3



More information about the notmuch mailing list