Re: [PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.

Subject: Re: [PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.

Date: Fri, 13 Oct 2017 10:35:08 -0400

To: David Bremner, Notmuch Mail


From: Daniel Kahn Gillmor

On Thu 2017-10-12 22:08:26 -0300, David Bremner wrote:
> The second _notmuch_database_log will override the first
> here. You can use _notmuch_database_log_append if you don't want to
> clear the existing log (e.g. at least for the second _log
> here).

good catch, thanks!  I'll include that in my next revision.  It's
already fixed in my gitlab branch.

>> +    const char *autoproperties[] = { "index-decryption" };
> I'm always a bit nervous when I see the same string hard coded into two
> different places.  What about using some prefix naming scheme like
> "" with the idea that all properties with the
> prefix "" could be blown away. If we settle on a prefix based
> naming scheme now, we could do the minor tweak to the properties API
> later so that it's only a single call.

Hm, i see what you're saying, but i'm a bit worried that stuffing this
"property of a property" into the name can cause two different forms of

first confusion:

"" has at least two different meanings at first
blush.  For example, it might mean "this message was automatically
decrypted", which isn't necessarily the case.

second confusion:

Even if we used a less ambiguous term like "flush-on-reindex", it would
seem weird to need to say "notmuch search
property:index.flush-on-reindex.decryption=failure", since the property
we're interested in is whether there was a failure in decrypting during
index time, not whether we expect the thing to be flushed on reindex.

We could maybe avoid both of these confusions by dropping "auto"
altogether and defining the following rule:

 * properties prefixed with "index." are set during indexing and will be
   cleared (and possibly re-set) upon reindexing


If you're ok with that, i could try to update the series to work that
way (and include documentation along those lines).

signature.asc (application/pgp-signature)
notmuch mailing list