database error
[notmuch-archives.git] / e6 / f183c762b7887b1ce094e72695600d7c0dcc41
1 Return-Path: <dme@dme.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id CC6DB429E41\r
6         for <notmuch@notmuchmail.org>; Fri,  2 May 2014 08:33:05 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 0iWrR0gF8aoo for <notmuch@notmuchmail.org>;\r
16         Fri,  2 May 2014 08:33:02 -0700 (PDT)\r
17 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com\r
18  [74.125.82.43])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  BF662429E32    for <notmuch@notmuchmail.org>; Fri,  2 May 2014 08:33:01 -0700\r
21  (PDT)\r
22 Received: by mail-wg0-f43.google.com with SMTP id l18so3798366wgh.14\r
23         for <notmuch@notmuchmail.org>; Fri, 02 May 2014 08:32:59 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:to:cc:subject:in-reply-to:references:user-agent\r
27         :from:date:message-id:mime-version:content-type;\r
28         bh=a7ioiZCitu4sP+xFu3sRNL6jZ3NCBX3jawYjfalPvrw=;\r
29         b=fG7vNrgOpSyKv915dlMFvmXxir0/X3nU+0aJo8R3BQT2Amky6fsnJGwD6T8G3WZ+Jb\r
30         h1LiFeJY7UiReyYGPEjPaviZVk0TYAw0apob6GNEwoEruTr1pGNN3M9LMr9CbXPJI6js\r
31         Xv0XIzN7Sy5RppEaf39fd7Q5Y4WCR/k8CXLtql1sU9sNZ+E+dVkF0J6esc4ObGSrjxNZ\r
32         B9OKVnU6ACZzZuAZf6nbaNkzU06skmiMPZ1y0NnxqSAqtuagnW7PpVOdnl/jnKaaEzSw\r
33         +mLd8RpsDvhhhzjBdswzZPYj0QTulrSi0neP99PCPROY55ZvFpR6Xedv7/XDAn1dN8vZ\r
34         ybmg==\r
35 X-Gm-Message-State:\r
36  ALoCoQmHOeMN18ZXn4SPonAYregKRX4JJvz8/FV3f+7lBkn9yJANPbctKFC6gxHVTyXwUQxdUgYE\r
37 X-Received: by 10.180.91.1 with SMTP id ca1mr3526268wib.32.1399044778278;\r
38         Fri, 02 May 2014 08:32:58 -0700 (PDT)\r
39 Received: from localhost ([2a01:348:1a2:1:a288:b4ff:fe8a:77d8])\r
40         by mx.google.com with ESMTPSA id vc2sm2661022wjc.2.2014.05.02.08.32.56\r
41         for <multiple recipients>\r
42         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
43         Fri, 02 May 2014 08:32:57 -0700 (PDT)\r
44 To: Austin Clements <amdragon@MIT.EDU>\r
45 Subject: Re: Add support for specifying tags during "notmuch new"\r
46 In-Reply-To: <20140502151800.GC8365@mit.edu>\r
47 References: <1399018555-1994-1-git-send-email-dme@dme.org>\r
48         <20140502151800.GC8365@mit.edu>\r
49 User-Agent: Notmuch/0.18~rc0 (http://notmuchmail.org) Emacs/24.3.1\r
50         (x86_64-pc-linux-gnu)\r
51 From: David Edmondson <dme@dme.org>\r
52 Date: Fri, 02 May 2014 16:32:50 +0100\r
53 Message-ID: <cun38gsgpr1.fsf@hotblack-desiato.hh.sledj.net>\r
54 MIME-Version: 1.0\r
55 Content-Type: multipart/signed; boundary="=-=-=";\r
56         micalg=pgp-sha1; protocol="application/pgp-signature"\r
57 Cc: notmuch@notmuchmail.org\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Fri, 02 May 2014 15:33:06 -0000\r
71 \r
72 --=-=-=\r
73 Content-Type: text/plain\r
74 \r
75 On Fri, May 02 2014, Austin Clements wrote:\r
76 >>     2) A periodic mail processing script wants to add new messages to\r
77 >>        the database, then process those newly added messages to add\r
78 >>        convenience tags, etc. without worrying about the user or other\r
79 >>        instances of the script manipulating tags at the same time. Use\r
80 >>        this approach:\r
81 >>          KEY=$RANDOM\r
82 >>       notmuch new +$KEY\r
83 >>       notmuch tag +notmuch tag:$KEY and to:notmuch@notmuchmail.org\r
84 >>       notmuch tag +gnus tag:$KEY and to:ding@gnus.org\r
85 >>       ...\r
86 >>       notmuch tag -$KEY tag:$KEY\r
87 >\r
88 > What happens when this script dies in the middle (say, your computer\r
89 > loses power or notmuch tag conflicts with something else on the write\r
90 > lock)?\r
91 \r
92 It's a problem. I think that I would actually add both 'new' and\r
93 'new-$seconds' tags (given that I can't search on wildcarded tags) and\r
94 have 'notmuch tag' use only 'new-$seconds'.\r
95 \r
96 The 'new' tag would help recover from failures such as you describe.\r
97 \r
98 > One advantage of the standard "new" tag approach is that it's easy to\r
99 > write a stateless post-new tagging script that can be killed at any\r
100 > point and restarted.  (You're right that post-new has a concurrency\r
101 > issue, but we should fix that in its own right.)\r
102 \r
103 --=-=-=\r
104 Content-Type: application/pgp-signature; name="signature.asc"\r
105 \r
106 -----BEGIN PGP SIGNATURE-----\r
107 Version: GnuPG v1\r
108 \r
109 iKYEARECAGYFAlNjuqJfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl\r
110 bnBncC5maWZ0aGhvcnNlbWFuLm5ldDc1M0Y5NDJDMEExNjc3MDE4OURGMUYyMDY5\r
111 RUNEMEFCRjA0OTY1MTYACgkQaezQq/BJZRZP3gCfbWjsjtXd0IuVlKO5pOZx9p+N\r
112 k0MAn1MlRr4mP5MID80FwxpYDnWhAHJF\r
113 =DKrB\r
114 -----END PGP SIGNATURE-----\r
115 --=-=-=--\r