1 Return-Path: <amdragon@mit.edu>
\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 3F7E6431FD0
\r
6 for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 07:59:28 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 4nVy7Lnl+6rY for <notmuch@notmuchmail.org>;
\r
16 Thu, 29 Sep 2011 07:59:27 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id D6D90431FB6
\r
20 for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 07:59:26 -0700 (PDT)
\r
21 X-AuditID: 1209190e-b7f4a6d0000008e5-36-4e8487ce031b
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id A2.68.02277.EC7848E4; Thu, 29 Sep 2011 10:59:26 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p8TExPPL011990;
\r
27 Thu, 29 Sep 2011 10:59:25 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p8TExOeN018787
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Thu, 29 Sep 2011 10:59:25 -0400 (EDT)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1R9I7P-0006pj-NJ; Thu, 29 Sep 2011 11:01:47 -0400
\r
37 Date: Thu, 29 Sep 2011 11:01:47 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Sebastian Spaeth <Sebastian@sspaeth.de>
\r
40 Subject: Re: [PATCH v6 00/17] Fix 'notmuch new' atomicity issues
\r
41 Message-ID: <20110929150147.GC17905@mit.edu>
\r
42 References: <87ei34rnc5.fsf@yoom.home.cworth.org>
\r
43 <1307822683-848-1-git-send-email-amdragon@mit.edu>
\r
44 <87fwjgoc8f.fsf@SSpaeth.de>
\r
46 Content-Type: text/plain; charset=us-ascii
\r
47 Content-Disposition: inline
\r
48 In-Reply-To: <87fwjgoc8f.fsf@SSpaeth.de>
\r
49 User-Agent: Mutt/1.5.20 (2009-06-14)
\r
50 X-Brightmail-Tracker:
\r
51 H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42IRYrdT1z3X3uJn8O0Zj8X1mzOZLWbNmcfo
\r
52 wOTxbNUtZo/FX5ayBDBFcdmkpOZklqUW6dslcGVs3eZW0M9b8WP3B6YGxtdcXYycHBICJhLP
\r
53 N05nh7DFJC7cW8/WxcjFISSwj1Fi+ZQPrBDOBkaJnQu3sYJUCQmcZJL49DgaIrGEUeLcwofM
\r
54 XYwcHCwCqhJNbwxBatgENCS27V/OCGKLCGhLHG3ZAdbLLCAt8e13M1MXIzuHsICDxDc1kCiv
\r
55 gI5E451eJoiJLYwSayY8ZoRICEqcnPmEBaJVS+LGv5dMIJtAxiz/xwFicgJtOvVSCKRCVEBF
\r
56 4tr+drYJjEKzkDTPQtI8C6F5ASPzKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl1jvdzMEr3UlNJN
\r
57 jKBw5pTk28H49aDSIUYBDkYlHt4fSc1+QqyJZcWVuYcYJTmYlER5Nze1+AnxJeWnVGYkFmfE
\r
58 F5XmpBYfYpTgYFYS4Y1rA8rxpiRWVqUW5cOkpDlYlMR5V+9w8BMSSE8sSc1OTS1ILYLJynBw
\r
59 KEnwvgZpFCxKTU+tSMvMKUFIM3FwggznARr+G2x4cUFibnFmOkT+FKMux9SGxycYhVjy8vNS
\r
60 pcR534AUCYAUZZTmwc2BpaFXjOJAbwlDrOMBpjC4Sa+AljABLfla2AiypCQRISXVwNjzfWVg
\r
61 +Wd1lQ5u9nkv1Gve8c3XZ25JK5ESL7WaeH1dpc3SBd8PuryLmOMk/Sgy+bqtZMzOxQydM0V+
\r
62 FQhPcwgO+7Kdo3mCyCbzZ5LRl9fbMt8MPnzSV2T9tr0nNnMXN6tOOT/tvLH+WY3F5y1LTQou
\r
63 L7c3VT+dFhsd9jbEOCKTZf2Tl27a4UosxRmJhlrMRcWJAPAh4xweAwAA
\r
64 Cc: notmuch@notmuchmail.org
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Thu, 29 Sep 2011 14:59:28 -0000
\r
79 Quoth Sebastian Spaeth on Sep 28 at 6:36 pm:
\r
80 > On Sat, 11 Jun 2011 16:04:26 -0400, Austin Clements <amdragon@MIT.EDU> wrote:
\r
81 > > Here's the reworked patch series that uses atomic sections more
\r
82 > > heavily rather than changing the removal API. This is atomic-new-v6
\r
83 > > on http://awakening.csail.mit.edu/git/notmuch.git .
\r
85 > I just caught up implementing find_message_by_filename and
\r
88 > One oddity, since databases are opened in read-only by default, I was
\r
89 > surprise to see find_message_by_filename on such a database have my
\r
90 > python instance crash...
\r
92 > > lib: Add an API to find a message by filename.
\r
93 > > Culled from "lib: Add API's to find by filename and ..." in the old
\r
94 > > series. What I kept is identical.
\r
96 > db.find_message_by_filename("moo")
\r
97 > Internal error: Failure to ensure database is writable
\r
98 > (lib/directory.cc:100).
\r
104 It appears that looking up a directory requires a writable database
\r
105 because notmuch will try to *create* a database document for the
\r
106 directory if one doesn't already exist. This is clearly wrong
\r
107 behavior for a "find" function.
\r
109 The exact code path is
\r
110 notmuch_database_find_message_by_filename
\r
111 _notmuch_database_filename_to_direntry
\r
112 _notmuch_database_find_directory_id
\r
113 _notmuch_directory_create
\r
115 _notmuch_message_add_filename currently depends on
\r
116 _notmuch_database_filename_to_direntry to create the directory
\r
117 document if it doesn't exist. Possibly
\r
118 _notmuch_database_filename_to_direntry,
\r
119 _notmuch_database_find_directory_id, and _notmuch_directory_create
\r
120 should acquire a flags argument with a "create" flag that controls
\r