From: Austin Clements Date: Fri, 1 Aug 2014 02:59:27 +0000 (+2000) Subject: [PATCH] lib: Invalidate message metadata in _notmuch_message_gen_terms X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=98ca9919134b6a5c61f616dad6c09d7472dcfb4c;p=notmuch-archives.git [PATCH] lib: Invalidate message metadata in _notmuch_message_gen_terms --- diff --git a/da/ef191b015313e9660d44c488f92fae2ed3eb25 b/da/ef191b015313e9660d44c488f92fae2ed3eb25 new file mode 100644 index 000000000..0817ac31c --- /dev/null +++ b/da/ef191b015313e9660d44c488f92fae2ed3eb25 @@ -0,0 +1,100 @@ +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 16CCA431FC9 + for ; Thu, 31 Jul 2014 19:59:43 -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 xygbLv0hJxJR for ; + Thu, 31 Jul 2014 19:59:38 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id BD0A1431FBF + for ; Thu, 31 Jul 2014 19:59:38 -0700 (PDT) +X-AuditID: 12074425-f79766d000006da8-ba-53db02990f82 +Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id F2.1C.28072.9920BD35; Thu, 31 Jul 2014 22:59:37 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s712xZ1d012352; + Thu, 31 Jul 2014 22:59:36 -0400 +Received: from drake.dyndns.org + (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [216.15.114.40]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s712xXLR010585 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Thu, 31 Jul 2014 22:59:35 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1XD344-0004XL-6v; Thu, 31 Jul 2014 22:59:28 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH] lib: Invalidate message metadata in + _notmuch_message_gen_terms +Date: Thu, 31 Jul 2014 22:59:27 -0400 +Message-Id: <1406861967-17404-1-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 2.0.0 +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsUixCmqrTuT6XawwZadnBbXb85kdmD0eLbq + FnMAYxSXTUpqTmZZapG+XQJXRs/uC2wFd9kq7q38y9jAeIy1i5GTQ0LAROLyzNvMELaYxIV7 + 69m6GLk4hARmM0l0bZzJAuFsZJRYfOUKK4Rzh0li5vkfjCAtQgJzGSVOXPAGsdkENCS27V8O + FhcRkJbYeXc2UAMHB7OAmsSfLhWQsLCAv8S+ideYQGwWAVWJaZOnsoGU8Ao4SFxf5QtxhJxE + w41PbBMYeRcwMqxilE3JrdLNTczMKU5N1i1OTszLSy3StdDLzSzRS00p3cQICgF2F9UdjBMO + KR1iFOBgVOLhdQi9FSzEmlhWXJl7iFGSg0lJlLfvP1CILyk/pTIjsTgjvqg0J7X4EKMEB7OS + CO/LD0A53pTEyqrUonyYlDQHi5I471trq2AhgfTEktTs1NSC1CKYrAwHh5IE7wnG28FCgkWp + 6akVaZk5JQhpJg5OkOE8QMOngNTwFhck5hZnpkPkTzEac1yYeaqNiWPR/pfdTEIsefl5qVJA + yxiASgVASjNK8+CmweL4FaM40HPCvAtBBvIAUwDcvFdAq5iAVj2/dR1kVUkiQkqqgTGyKr41 + /Opr0yKl1C6vP+3TGddt//Xkt6jyL43a/tnrXm2VCF5yyD+84NSxR6+PrDfdu+dT8Rox5UUH + zpwTdDP+y/zT68zZN+cqtlv7mcUHnWZbYrDv4zcrnw+NPNvv61e7uG2sWfOIJfW+R6ty99K/ + Fxl1HLZJ3lN2tTU5nX1/8eNJdhHMr98qsRRnJBpqMRcVJwIA7zv3pr4CAAA= +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: Fri, 01 Aug 2014 02:59:43 -0000 + +Previously, we invalidated stored message metadata in +_notmuch_message_add_term and _notmuch_message_remove_term, but not in +_notmuch_message_gen_terms. This doesn't currently result in any bugs +because of our limited uses of _notmuch_message_gen_terms, but it may +could cause trouble in the future. +--- + lib/message.cc | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/message.cc b/lib/message.cc +index 1618e81..cde6a1c 100644 +--- a/lib/message.cc ++++ b/lib/message.cc +@@ -1049,6 +1049,8 @@ _notmuch_message_gen_terms (notmuch_message_t *message, + /* Create a gap between this an the next terms so they don't + * appear to be a phrase. */ + message->termpos = term_gen->get_termpos () + 100; ++ ++ _notmuch_message_invalidate_metadata (message, prefix_name); + } + + term_gen->set_termpos (message->termpos); +-- +2.0.0 +