From: Austin Clements Date: Wed, 6 Aug 2014 17:06:48 +0000 (+2000) Subject: Re: [PATCH] Add configurable changed tag to messages that have been changed on disk X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1df1f2bb7a489063dd020565051d0ff7c978aa56;p=notmuch-archives.git Re: [PATCH] Add configurable changed tag to messages that have been changed on disk --- diff --git a/b5/3944c5bbd4b41ed7a1070c129eb72def05fd9f b/b5/3944c5bbd4b41ed7a1070c129eb72def05fd9f new file mode 100644 index 000000000..5c2efedf4 --- /dev/null +++ b/b5/3944c5bbd4b41ed7a1070c129eb72def05fd9f @@ -0,0 +1,145 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 8CE7F431FAF + for ; Wed, 6 Aug 2014 10:07:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id erLWDMylNGod for ; + Wed, 6 Aug 2014 10:06:56 -0700 (PDT) +Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu + [18.7.68.36]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5B566431FAE + for ; Wed, 6 Aug 2014 10:06:56 -0700 (PDT) +X-AuditID: 12074424-f79146d00000067c-7c-53e260af966e +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP + id EE.76.01660.FA062E35; Wed, 6 Aug 2014 13:06:55 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s76H6rw8000480; + Wed, 6 Aug 2014 13:06:54 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s76H6ovc017161 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Wed, 6 Aug 2014 13:06:52 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1XF4fq-00051B-60; Wed, 06 Aug 2014 13:06:50 -0400 +Date: Wed, 6 Aug 2014 13:06:48 -0400 +From: Austin Clements +To: Gaute Hope +Subject: Re: [PATCH] Add configurable changed tag to messages that have been + changed on disk +Message-ID: <20140806170647.GA13893@mit.edu> +References: <1396800683-9164-1-git-send-email-eg@gaute.vetsj.com> + <87fviiiuzn.fsf@maritornes.cs.unb.ca> + + <20140801185505.GS13893@mit.edu> + +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: + +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFprKKsWRmVeSWpSXmKPExsUixG6nors+4VGwQddxTYsbrd2MFk2fL7Fa + XL85k9liX7+/A4vHj3/NbB7PVt1i9pgyay67x5ZD75kDWKK4bFJSczLLUov07RK4Mo48nM5W + 8Ea0YnnHHcYGxj7BLkYODgkBE4krn0K6GDmBTDGJC/fWs4HYQgKzmSROXFfrYuQCsjcwSky9 + coQJwjnFJLH27yxGCGcJo0R/x0Z2kBYWARWJRS+2MoHYbAIaEtv2L2cEsUUElCUuvdnPDGIz + C5RJ9D6ZC7ZCWCBOYtrlHUwgV/AK6Eh0bHKAmDmLSWLO6iVgM3kFBCVOznzCAtGrJXHj30uw + emYBaYnl/zhAwpwCgRInZ0wFWyUKdMKUk9vYJjAKzULSPQtJ9yyE7gWMzKsYZVNyq3RzEzNz + ilOTdYuTE/PyUot0zfVyM0v0UlNKNzGCQ99FZQdj8yGlQ4wCHIxKPLwz4x8GC7EmlhVX5h5i + lORgUhLlDY1+FCzEl5SfUpmRWJwRX1Sak1p8iFGCg1lJhFfcBijHm5JYWZValA+TkuZgURLn + fWttFSwkkJ5YkpqdmlqQWgSTleHgUJLgrY8HahQsSk1PrUjLzClBSDNxcIIM5wEaHgVSw1tc + kJhbnJkOkT/FqCglzrscJCEAksgozYPrhaWmV4ziQK8I86aDVPEA0xpc9yugwUxAg8107oMM + LklESEk1MEY0HH2gvkja7fsGv7efuWe0zJwg+uaH2Ga1I6t2u77k3jK9q0TqlZPLrLeCk+p9 + zJ8JuS3Quan/vu5oMN+alJVznv+YpreF++ezL72FTdbiGRNNq9XnBZoFX6/S+PThefPs4M/q + E6MeS17adtli2fyS/Z9Xv5x5Vfrk1Y0Bf7OnTFub+ObJiqteSizFGYmGWsxFxYkAKYrP6SgD AAA= +Cc: notmuch +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Wed, 06 Aug 2014 17:07:01 -0000 + +Quoth Gaute Hope on Aug 06 at 11:02 am: +> On Fri, Aug 1, 2014 at 8:55 PM, Austin Clements wrote: +> > I have a prototype implementation of message modification times on my +> > lastmod-v1 branch at +> > +> > https://github.com/aclements/notmuch/tree/lastmod-v1 +> > +> > It builds on my database features series that's currently awaiting +> > review [1]. +> > +> > The series uses a monotonic revision number, rather than wall-clock +> > time, for reasons related to Xapian's concurrent control and detailed +> > in the main commit's commit message. The implementation isn't quite +> > useful from the CLI yet because I haven't added any way to query the +> > database's current revision number. (I'm still thinking about how I +> > want to do this, since search/show don't have a good way to deliver +> > "additional" information right now. I might just add the last +> > modification for each individual message/max of all messages in a +> > thread, similar to what Thomas Jost's patch did long ago.) +> > +> > [1] id:1406859003-11561-1-git-send-email-amdragon@mit.edu +> +> +> Hi, +> +> this should allow me to do what I wish to accomplish. The message +> deletion is still a problem though, I can see two options at the moment: +> +> a) output during notmuch new to a hook or a list somewhere deleted files. +> if list: notmuch will not handle this list, only append to it and +> the user must +> purge it when it is safe to do so. +> +> if hook: for my purposes I would just create a hook appending to the +> list. as a minimum I think thread_id, message_id and revision number +> should be included. +> +> +> b) maintain a full list of deleted / dead messages. a user initiated +> purge can clean this from the database. a tag could be used for this, +> so that clients can ignore unlinked/deleted/dead messages. this +> differs from a 'deleted' message (IMAP/Maildir context) that has not +> yet been expunged so there is confusion to be avoided. +> +> a garbage collection function and interface must also be set up, but +> this one is probably simple. +> +> +> in most cases I think a) would be sufficient, and probably much easier +> to do. it might be slow in cases where large amounts of messages have been +> deleted, but this is seldom the case for me at least. + +I have a separate branch (also sitting on top of the features branch) +that implements "ghost" messages. The main intent is to fix a bug we +currently have in threading, but it puts us in a good position to +maintain state for messages we don't have the content of, including +last modification times for deleted messages and pre-seeded tags for +undelivered messages (useful for pre-tagging sent messages as sent, +nmbug, notmuch insert, etc.)