]> git.notmuchmail.org Git - notmuch/commitdiff
lib/database.cc: use flush Xapian method instead of commit
authorDavid Bremner <bremner@debian.org>
Fri, 28 Oct 2011 14:56:30 +0000 (11:56 -0300)
committerDavid Bremner <bremner@debian.org>
Wed, 2 Nov 2011 23:38:22 +0000 (20:38 -0300)
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

index 88be939138c7e6db51fc2e1fc70313bb170d2a1e..fa632f85121a56d969c2365ff882282290007f53 100644 (file)
@@ -1015,7 +1015,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());