<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/database-private.h, branch debian/0.22-1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.22-1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.22-1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2015-08-14T16:23:49Z</updated>
<entry>
<title>lib: Add "lastmod:" queries for filtering by last modification</title>
<updated>2015-08-14T16:23:49Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-13T06:20:03Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=cb08a2ee019e52dc29ba393d139fce8d7282c632'/>
<id>urn:sha1:cb08a2ee019e52dc29ba393d139fce8d7282c632</id>
<content type='text'>
The implementation is essentially the same as the date range search
prior to Jani's fancy date parser.
</content>
</entry>
<entry>
<title>lib: API to retrieve database revision and UUID</title>
<updated>2015-08-13T21:52:51Z</updated>
<author>
<name>Austin Clements</name>
<email>aclements@csail.mit.edu</email>
</author>
<published>2014-10-13T06:20:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=98ee460eaa98f1428aecf03dd39fcf314e6f62c0'/>
<id>urn:sha1:98ee460eaa98f1428aecf03dd39fcf314e6f62c0</id>
<content type='text'>
This exposes the committed database revision to library users along
with a UUID that can be used to detect when revision numbers are no
longer comparable (e.g., because the database has been replaced).
</content>
</entry>
<entry>
<title>lib: Add per-message last modification tracking</title>
<updated>2015-08-13T21:52:51Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-13T06:20:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7f57b747b95eece465d10fd0acba20cc3dd868f1'/>
<id>urn:sha1:7f57b747b95eece465d10fd0acba20cc3dd868f1</id>
<content type='text'>
This adds a new document value that stores the revision of the last
modification to message metadata, where the revision number increases
monotonically with each database commit.

An alternative would be to store the wall-clock time of the last
modification of each message.  In principle this is simpler and has
the advantage that any process can determine the current timestamp
without support from libnotmuch.  However, even assuming a computer's
clock never goes backward and ignoring clock skew in networked
environments, this has a fatal flaw.  Xapian uses (optimistic)
snapshot isolation, which means reads can be concurrent with writes.
Given this, consider the following time line with a write and two read
transactions:

   write  |-X-A--------------|
   read 1       |---B---|
   read 2                      |---|

The write transaction modifies message X and records the wall-clock
time of the modification at A.  The writer hangs around for a while
and later commits its change.  Read 1 is concurrent with the write, so
it doesn't see the change to X.  It does some query and records the
wall-clock time of its results at B.  Transaction read 2 later starts
after the write commits and queries for changes since wall-clock time
B (say the reads are performing an incremental backup).  Even though
read 1 could not see the change to X, read 2 is told (correctly) that
X has not changed since B, the time of the last read.  In fact, X
changed before wall-clock time A, but the change was not visible until
*after* wall-clock time B, so read 2 misses the change to X.

This is tricky to solve in full-blown snapshot isolation, but because
Xapian serializes writes, we can use a simple, monotonically
increasing database revision number.  Furthermore, maintaining this
revision number requires no more IO than a wall-clock time solution
because Xapian already maintains statistics on the upper (and lower)
bound of each value stream.
</content>
</entry>
<entry>
<title>lib: add a log function with output to a string in notmuch_database_t</title>
<updated>2015-03-28T23:34:15Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-12-26T08:01:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b53e1a2da720e9a0efd815b92f0a54dc2f644ffc'/>
<id>urn:sha1:b53e1a2da720e9a0efd815b92f0a54dc2f644ffc</id>
<content type='text'>
In principle in the future this could do something fancier than
asprintf.
</content>
</entry>
<entry>
<title>Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature</title>
<updated>2015-01-24T15:47:47Z</updated>
<author>
<name>Todd</name>
<email>todd@electricoding.com</email>
</author>
<published>2015-01-22T23:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0de999aab5bd4cd44bc4ea76fd1d25172bd839ae'/>
<id>urn:sha1:0de999aab5bd4cd44bc4ea76fd1d25172bd839ae</id>
<content type='text'>
This feature will exist in all newly created databases, but there is
no upgrade provided for it.  If this flag exists, it indicates that
the database was created after the indexed MIME-types feature was
added.
</content>
</entry>
<entry>
<title>lib: Enable ghost messages feature</title>
<updated>2014-10-25T17:31:27Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-23T12:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ee476f1e7616fa53c492b8077b55af35662eec82'/>
<id>urn:sha1:ee476f1e7616fa53c492b8077b55af35662eec82</id>
<content type='text'>
This fixes the broken thread order test.
</content>
</entry>
<entry>
<title>lib: Add a ghost messages database feature</title>
<updated>2014-10-25T17:25:54Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-23T12:30:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1cdb96d3c4a2fc5ddf3a6e5c73c59c0f0e65cae2'/>
<id>urn:sha1:1cdb96d3c4a2fc5ddf3a6e5c73c59c0f0e65cae2</id>
<content type='text'>
This will be implemented over the next several patches.  The feature
is not yet "enabled" (this does not add it to
NOTMUCH_FEATURES_CURRENT).
</content>
</entry>
<entry>
<title>lib: Database version 3: Introduce fine-grained "features"</title>
<updated>2014-08-30T17:42:08Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-08-25T17:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8363c9053152d349022b821a4a343f0ee2ade318'/>
<id>urn:sha1:8363c9053152d349022b821a4a343f0ee2ade318</id>
<content type='text'>
Previously, our database schema was versioned by a single number.
Each database schema change had to occur "atomically" in Notmuch's
development history: before some commit, Notmuch used version N, after
that commit, it used version N+1.  Hence, each new schema version
could introduce only one change, the task of developing a schema
change fell on a single person, and it all had to happen and be
perfect in a single commit series.  This made introducing a new schema
version hard.  We've seen only two schema changes in the history of
Notmuch.

This commit introduces database schema version 3; hopefully the last
schema version we'll need for a while.  With this version, we switch
from a single version number to "features": a set of named,
independent aspects of the database schema.

Features should make backwards compatibility easier.  For many things,
it should be easy to support databases both with and without a
feature, which will allow us to make upgrades optional and will enable
"unstable" features that can be developed and tested over time.

Features also make forwards compatibility easier.  The features
recorded in a database include "compatibility flags," which can
indicate to an older version of Notmuch when it must support a given
feature to open the database for read or for write.  This lets us
replace the old vague "I don't recognize this version, so something
might go wrong, but I promise to try my best" warnings upon opening a
database with an unknown version with precise errors.  If a database
is safe to open for read/write despite unknown features, an older
version will know that and issue no message at all.  If the database
is not safe to open for read/write because of unknown features, an
older version will know that, too, and can tell the user exactly which
required features it lacks support for.
</content>
</entry>
<entry>
<title>lib: add date range query support</title>
<updated>2012-10-31T19:55:32Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2012-10-30T20:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=90cd1bac4eeb0d57fbe2740625aaa58d8d925ee5'/>
<id>urn:sha1:90cd1bac4eeb0d57fbe2740625aaa58d8d925ee5</id>
<content type='text'>
Add a custom value range processor to enable date and time searches of
the form date:since..until, where "since" and "until" are expressions
understood by the previously added date/time parser, to restrict the
results to messages within a particular time range (based on the Date:
header).

If "since" or "until" describes date/time at an accuracy of days or
less, the values are rounded according to the accuracy, towards past
for "since" and towards future for "until". For example,
date:november..yesterday would match from the beginning of November
until the end of yesterday. Expressions such as date:today..today
means since the beginning of today until the end of today.

Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can
specify date:..until or date:since.. to not limit the start or end
date, respectively.

CAVEATS:

Xapian does not support spaces in range expressions. You can replace
the spaces with '_', or (in most cases) '-', or (in some cases) leave
the spaces out altogether.

Entering date:expr without ".." (for example date:yesterday) will not
work as you might expect. You can achieve the expected result by
duplicating the expr both sides of ".." (for example
date:yesterday..yesterday).

Open-ended ranges won't work with pre-1.2.1 Xapian, but they don't
produce an error either.

Signed-off-by: Jani Nikula &lt;jani@nikula.org&gt;
</content>
</entry>
<entry>
<title>lib: Add support for nested atomic sections.</title>
<updated>2011-09-24T01:50:38Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-06-11T03:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e59cc0031fbf84f49e32dedb9927f427d2c49309'/>
<id>urn:sha1:e59cc0031fbf84f49e32dedb9927f427d2c49309</id>
<content type='text'>
notmuch_database_t now keeps a nesting count and we only start a
transaction or commit for the outermost atomic section.

Introduces a new error, NOTMUCH_STATUS_UNBALANCED_ATOMIC.
</content>
</entry>
</feed>
