<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/message.cc, branch 0.4</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.4</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.4'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2010-11-02T06:24:40Z</updated>
<entry>
<title>lib: Eliminate some redundant includes of xapian.h</title>
<updated>2010-11-02T06:24:40Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-02T05:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d064bd696ccc443a7ece9cfc8816999c69943223'/>
<id>urn:sha1:d064bd696ccc443a7ece9cfc8816999c69943223</id>
<content type='text'>
Most files including this already include database-private.h which
includes xapian.h already.
</content>
</entry>
<entry>
<title>Avoid database corruption by not adding partially-constructed mail documents.</title>
<updated>2010-06-04T17:16:53Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-06-04T17:16:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=98845fdbb2a4acaa0036f8e2e998e726b18e6b13'/>
<id>urn:sha1:98845fdbb2a4acaa0036f8e2e998e726b18e6b13</id>
<content type='text'>
Previously we were using Xapian's add_document to allocate document ID
values for notmuch_message_t objects.  This had the drawback of adding
a partially constructed mail document to the database. If notmuch was
subsequently interrupted before fully populating this document, then
later runs would be quite confused when seeing the partial documents.

There are reports from the wild of people hitting internal errors of
the form "Message ... has no thread ID" for example, (which is
currently an unrecoverable error).

We fix this by manually allocating document IDs without adding
documents. With this change, we never call Xapian's add_document
method, but only replace_document with either the current document ID
of a message or a new one that we have allocated.
</content>
</entry>
<entry>
<title>Fix misnamed function in internal documentation.</title>
<updated>2010-06-04T16:54:46Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-06-04T16:54:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=361b9d4bd9042629e3729b43d18a862ddc716242'/>
<id>urn:sha1:361b9d4bd9042629e3729b43d18a862ddc716242</id>
<content type='text'>
The documentation for several functions mentioned
_notmuch_message_set_sync which doesn't exist. Fix these to reference
_notmuch_message_sync instead.
</content>
</entry>
<entry>
<title>Add authors member to message</title>
<updated>2010-04-26T18:44:49Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>hohndel@infradead.org</email>
</author>
<published>2010-04-24T18:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=57561414d76297c16b4b6f3da570f14b4ddf020c'/>
<id>urn:sha1:57561414d76297c16b4b6f3da570f14b4ddf020c</id>
<content type='text'>
message-&gt;authors contains the author's name (as we want to print it)
get / set methods are declared in notmuch-private.h

Signed-off-by: Dirk Hohndel &lt;hohndel@infradead.org&gt;
</content>
</entry>
<entry>
<title>lib: Silence a compiler warning.</title>
<updated>2010-03-09T20:07:26Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-03-09T20:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c446f22dee2de6f837709207f554607cf0882836'/>
<id>urn:sha1:c446f22dee2de6f837709207f554607cf0882836</id>
<content type='text'>
The original code was harmless, but apparently some compilers aren't
able to think deep enough to catch that.
</content>
</entry>
<entry>
<title>lib: Rename iterator functions to prepare for reverse iteration.</title>
<updated>2010-03-09T17:22:29Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-03-09T17:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4e5d2f22db290a830c0267f34b519c6138af00ed'/>
<id>urn:sha1:4e5d2f22db290a830c0267f34b519c6138af00ed</id>
<content type='text'>
We rename 'has_more' to 'valid' so that it can function whether
iterating in a forward or reverse direction. We also rename
'advance' to 'move_to_next' to setup parallel naming with
the proposed functions 'move_to_first', 'move_to_last', and
'move_to_previous'.
</content>
</entry>
<entry>
<title>Switch from random to sequential thread identifiers.</title>
<updated>2010-02-09T19:14:11Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-02-08T19:33:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9439b217c349478b3603d5368f534acb1cd23974'/>
<id>urn:sha1:9439b217c349478b3603d5368f534acb1cd23974</id>
<content type='text'>
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).
</content>
</entry>
<entry>
<title>lib: Add non-content terms with a WDF value of 0.</title>
<updated>2010-01-09T19:18:27Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-09T19:18:27Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ccf2e0cc4211c276da1db43cdca7ee11018c391d'/>
<id>urn:sha1:ccf2e0cc4211c276da1db43cdca7ee11018c391d</id>
<content type='text'>
The WDF is the "within-document frequency" value for a particular
term. It's intended to provide an indication of how frequent a term is
within a document, (for use in computing relevance). Xapian's term
generator already computes WDF values when we use that, (which we do
for indexing all mail content).

We don't use the term generator when adding single terms for things
that don't actually appear in the mail document, (such as tags, the
filename, etc.). In this case, the WDF value for these terms doesn't
matter much.

But Xapian's flint backend can be more efficient with changes to terms
that don't affect the document "length". So there's a performance
advantage for manipulating tags (with the flint backend) if the WDF of
these terms is 0.
</content>
</entry>
<entry>
<title>lib: Split the database upgrade into two phases for safer operation.</title>
<updated>2010-01-09T19:13:12Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-09T19:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d12801c8b4d04a50fcb912b75017244fb09658e8'/>
<id>urn:sha1:d12801c8b4d04a50fcb912b75017244fb09658e8</id>
<content type='text'>
The first phase copies data from the old format to the new format
without deleting anything. This allows an old notmuch to still use the
database if the upgrade process gets interrupted. The second phase
performs the deletion (after updating the database version number). If
the second phase is interrupted, there will be some unused data in the
database, but it shouldn't cause any actual harm.
</content>
</entry>
<entry>
<title>lib: Implement versioning in the database and provide upgrade function.</title>
<updated>2010-01-08T02:26:31Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-08T02:26:31Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=909f52bd8c4bdfa11cd3e75e3d0959e0293689bd'/>
<id>urn:sha1:909f52bd8c4bdfa11cd3e75e3d0959e0293689bd</id>
<content type='text'>
The recent support for renames in the database is our first time
(since notmuch has had more than a single user) that we have a
database format change. To support smooth upgrades we now encode a
database format version number in the Xapian metadata.

Going forward notmuch will emit a warning if used to read from a
database with a newer version than it natively supports, and will
refuse to write to a database with a newer version.

The library also provides functions to query the database format
version:

	notmuch_database_get_version

to ask if notmuch wants a newer version than that:

	notmuch_database_needs_upgrade

and a function to actually perform that upgrade:

	notmuch_database_upgrade
</content>
</entry>
</feed>
