[PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Oct 13 07:35:08 PDT 2017
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
> "index.auto.decryption" with the idea that all properties with the
> prefix "index.auto." 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
confusion.
first confusion:
"index.auto.decryption" 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
wdyt?
If you're ok with that, i could try to update the series to work that
way (and include documentation along those lines).
--dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171013/e9d7ee62/attachment.sig>
More information about the notmuch
mailing list