[PATCH 6/6] lib: Add "lastmod:" queries for filtering by last modification
David Bremner
david at tethera.net
Fri Aug 7 13:22:56 PDT 2015
Daniel Schoepe <daniel at 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
More information about the notmuch
mailing list