From 9439b217c349478b3603d5368f534acb1cd23974 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 8 Feb 2010 11:33:33 -0800 Subject: Switch from random to sequential thread identifiers. The sequential identifiers have the advantage of being guaranteed to be unique (until we overflow a 64-bit unsigned integer), and also take up half as much space in the "notmuch search" output (16 columns rather than 32). This change also has the side effect of fixing a bug where notmuch could block on /dev/random at startup (waiting for some entropy to appear). This bug was hit hard by the test suite, (which could easily exhaust the available entropy on common systems---resulting in large delays of the test suite). --- lib/database-private.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/database-private.h') diff --git a/lib/database-private.h b/lib/database-private.h index 5891584e..5bb6e86c 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -27,14 +27,19 @@ struct _notmuch_database { notmuch_bool_t exception_reported; + char *path; + + notmuch_bool_t needs_upgrade; notmuch_database_mode_t mode; Xapian::Database *xapian_db; + + uint64_t last_thread_id; + Xapian::QueryParser *query_parser; Xapian::TermGenerator *term_gen; Xapian::ValueRangeProcessor *value_range_processor; - notmuch_bool_t needs_upgrade; }; /* Convert tags from Xapian internal format to notmuch format. -- cgit v1.2.3