Re: [PATCH 6/6] lib: Add "lastmod:" queries for filtering by last modification

Subject: Re: [PATCH 6/6] lib: Add "lastmod:" queries for filtering by last modification

Date: Fri, 07 Aug 2015 22:22:56 +0200

To: Daniel Schoepe, notmuch@notmuchmail.org

Cc:

From: David Bremner


Daniel Schoepe <daniel@schoepe.org> writes:

>
> It might be helpful to describe why --db-revision is needed here. At
> first glance, just using `notmuch search lastmod:UUID..' looks good
> enough to get all changed messages since UUID. Indeed, it's not entirely
> clear to me under what conditions just using this query causes problems.
> Moreover, it would be quite nice and intuitive if that query did the job
> without having to constrain the database revision manually as well.

There are two notions of revision here, and I agree the naming could be
clearer. I blame Austin ;).

--db-revision refers to the major-revision/epoch ; this is only changed
  e.g. when the the database is re-created from scratch.

lastmod:a..b  refers to integers that increase with every database operation.

Maybe --db-revision should be called --db-uuid ; this is at least
consistent with the library API.

In answer to why it's needed, the database changing UUID signals any
externally stored modification information (e.g. for incremental
backups) is now invalid.

d

Thread: