<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/database.cc, branch debian/0.21_rc3-2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.21_rc3-2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.21_rc3-2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2015-10-05T22:53:11Z</updated>
<entry>
<title>lib: migrate notmuch_database_upgrade to new query_search API</title>
<updated>2015-10-05T22:53:11Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-09-27T15:32:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2501c2565ccca19e3e49fa1594aaa90f04e37d6d'/>
<id>urn:sha1:2501c2565ccca19e3e49fa1594aaa90f04e37d6d</id>
<content type='text'>
Here we depend on the error path cleaning up query
</content>
</entry>
<entry>
<title>lib: add versions of n_q_count_{message,threads} with status return</title>
<updated>2015-10-05T22:44:07Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-09-27T15:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=87ee9a53e36f395e73e16da12cb268a708147259'/>
<id>urn:sha1:87ee9a53e36f395e73e16da12cb268a708147259</id>
<content type='text'>
Although I think it's a pretty bad idea to continue using the old API,
this allows both a more gentle transition for clients of the library,
and allows us to break one monolithic change into a series
</content>
</entry>
<entry>
<title>lib: move query variable to function scope</title>
<updated>2015-10-05T22:39:11Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-09-27T15:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=65a6b86873a471bb87d30a8617a87857103cd8b6'/>
<id>urn:sha1:65a6b86873a471bb87d30a8617a87857103cd8b6</id>
<content type='text'>
This is a prelude to deallocating it (if necessary) on the error path.
</content>
</entry>
<entry>
<title>lib: constify argument to notmuch_database_status_string</title>
<updated>2015-09-04T11:24:38Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-06-07T15:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bd5504ec10edf6a1442d92774dc06fafc0b46e3f'/>
<id>urn:sha1:bd5504ec10edf6a1442d92774dc06fafc0b46e3f</id>
<content type='text'>
We don't modify the database struct, so no harm in committing to that.
</content>
</entry>
<entry>
<title>lib: note remaining uses of deprecated message search API</title>
<updated>2015-09-04T11:08:18Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-06-07T15:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=110694b00b79793b3c09a0349c0ff7608df551d6'/>
<id>urn:sha1:110694b00b79793b3c09a0349c0ff7608df551d6</id>
<content type='text'>
The two remaining cases in the lib seem to require more than a simple
replacement of the old call, with the new call plus a check of the
return value.
</content>
</entry>
<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: reject relative paths in n_d_{create,open}_verbose</title>
<updated>2015-06-12T05:34:50Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-06-08T06:02:22Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=32fd74b7aa9c24ec77f8c59d09f89e0535bf64cd'/>
<id>urn:sha1:32fd74b7aa9c24ec77f8c59d09f89e0535bf64cd</id>
<content type='text'>
There are many places in the notmuch code where the path is assumed to be absolute. If someone (TM) wants a project, one could remove these assumptions. In the mean time, prevent users from shooting themselves in the foot.

Update test suite mark tests for this error as no longer broken, and
also convert some tests that used relative paths for nonexistent
directories.
</content>
</entry>
<entry>
<title>lib: add NOTMUCH_STATUS_PATH_ERROR</title>
<updated>2015-06-12T05:34:47Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-06-10T05:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b59ad1a9cc6ea03764b1cd3d038920581ac5a9c4'/>
<id>urn:sha1:b59ad1a9cc6ea03764b1cd3d038920581ac5a9c4</id>
<content type='text'>
The difference with FILE_ERROR is that this is for things that are
wrong with the path before looking at the disk.

Add some 3 tests; two broken as a reminder to actually use this new
code.
</content>
</entry>
</feed>
