]> git.notmuchmail.org Git - notmuch/blobdiff - lib/database-private.h
lib: autocommit after some number of completed transactions
[notmuch] / lib / database-private.h
index 1a73dacc365f563134d123fe09d91668b45a6d1f..9706c17e68f9de13fd4377a4386592fe0894e2be 100644 (file)
@@ -212,6 +212,11 @@ struct _notmuch_database {
     char thread_id_str[17];
     uint64_t last_thread_id;
 
+    /* How many transactions have successfully completed since we last committed */
+    int transaction_count;
+    /* when to commit and reset the counter */
+    int transaction_threshold;
+
     /* error reporting; this value persists only until the
      * next library call. May be NULL */
     char *status_string;