From: David Bremner Date: Fri, 7 Aug 2015 20:22:56 +0000 (+0200) Subject: Re: [PATCH 6/6] lib: Add "lastmod:" queries for filtering by last modification X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=36ea73c8dd3e24d4c9b78ef3a4908bf99eceb3c4;p=notmuch-archives.git Re: [PATCH 6/6] lib: Add "lastmod:" queries for filtering by last modification --- diff --git a/fd/f29b047a3e429dab29d7088532c54239a0c70e b/fd/f29b047a3e429dab29d7088532c54239a0c70e new file mode 100644 index 000000000..9ca1b565d --- /dev/null +++ b/fd/f29b047a3e429dab29d7088532c54239a0c70e @@ -0,0 +1,79 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 8565C6DE1623 + for ; Fri, 7 Aug 2015 13:24:40 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.137 +X-Spam-Level: +X-Spam-Status: No, score=0.137 tagged_above=-999 required=5 tests=[AWL=0.137] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id GU2LtpuDOwDC for ; + Fri, 7 Aug 2015 13:24:39 -0700 (PDT) +Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id C20B66DE15A1 + for ; Fri, 7 Aug 2015 13:24:38 -0700 (PDT) +Received: from remotemail by gitolite.debian.net with local (Exim 4.80) + (envelope-from ) + id 1ZNoAZ-0007Ie-JN; Fri, 07 Aug 2015 20:23:11 +0000 +Received: (nullmailer pid 29592 invoked by uid 1000); Fri, 07 Aug 2015 + 20:22:56 -0000 +From: David Bremner +To: Daniel Schoepe , notmuch@notmuchmail.org +Subject: Re: [PATCH 6/6] lib: Add "lastmod:" queries for filtering by last + modification +In-Reply-To: <8737zvjyy4.fsf@schoepe.localhost> +References: <1432936375-astroid-4-0i1n6yczs2-1520@strange> + <1433525318-23756-1-git-send-email-david@tethera.net> + <1433525318-23756-7-git-send-email-david@tethera.net> + <8737zvjyy4.fsf@schoepe.localhost> +User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Fri, 07 Aug 2015 22:22:56 +0200 +Message-ID: <87twsa97bz.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 07 Aug 2015 20:24:40 -0000 + +Daniel Schoepe 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