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 440F8431E64
\r
6 for <notmuch@notmuchmail.org>; Wed, 29 Feb 2012 07:48:38 -0800 (PST)
\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 1e23ME085oqC for <notmuch@notmuchmail.org>;
\r
16 Wed, 29 Feb 2012 07:48:37 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 96A55429E25
\r
20 for <notmuch@notmuchmail.org>; Wed, 29 Feb 2012 07:48:37 -0800 (PST)
\r
21 X-AuditID: 12074423-b7f9c6d0000008c3-13-4f4e48d4cb98
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 57.B3.02243.4D84E4F4; Wed, 29 Feb 2012 10:48:36 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q1TFmZ36012392;
\r
27 Wed, 29 Feb 2012 10:48:35 -0500
\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 q1TFmXow002648
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Wed, 29 Feb 2012 10:48:35 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1S2llZ-000861-Nd; Wed, 29 Feb 2012 10:48:33 -0500
\r
37 Date: Wed, 29 Feb 2012 10:48:33 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Justus Winter <4winter@informatik.uni-hamburg.de>,
\r
40 Olly Betts <olly@survex.com>
\r
41 Subject: Re: [PATCH] Actually close the xapian database in
\r
42 notmuch_database_close
\r
43 Message-ID: <20120229154833.GB772@mit.edu>
\r
45 <1330507157-22859-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
46 <1330507157-22859-2-git-send-email-4winter@informatik.uni-hamburg.de>
\r
48 Content-Type: text/plain; charset=us-ascii
\r
49 Content-Disposition: inline
\r
51 <1330507157-22859-2-git-send-email-4winter@informatik.uni-hamburg.de>
\r
52 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
53 X-Brightmail-Tracker:
\r
54 H4sIAAAAAAAAA+NgFupnleLIzCtJLcpLzFFi42IR4hTV1r3i4edvcPeWoMXs1h9MFtdvzmS2
\r
55 uL/8PasDs8fE86fZPJ6tusXssW7nH/YA5igum5TUnMyy1CJ9uwSujGszdrEVvOKsuDDzPlsD
\r
56 4zP2LkZODgkBE4lj/9YxQ9hiEhfurWfrYuTiEBLYxyixcsExdghnA6NEw9zDTBDOSSaJfZ03
\r
57 mSGcJYwS6xeeYwHpZxFQldhwbhmYzSagIbFt/3JGEFtEIEZiz8o3rCA2s4C0xLffzUwgtrBA
\r
58 sMSpyafZQGxeAS2J63O2QG2YySjRf+YwC0RCUOLkzCcsEM1aEjf+vQQq4gAbtPwfB0iYUyBI
\r
59 YvHV/WAlogIqElNObmObwCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI1
\r
60 08vNLNFLTSndxAgKd3YX5R2Mfw4qHWIU4GBU4uGV5Pf1F2JNLCuuzD3EKMnBpCTKe9Hdz1+I
\r
61 Lyk/pTIjsTgjvqg0J7X4EKMEB7OSCO9bKaAcb0piZVVqUT5MSpqDRUmcV0PrnZ+QQHpiSWp2
\r
62 ampBahFMVoaDQ0mC1w8Y10KCRanpqRVpmTklCGkmDk6Q4TxAw++DLOYtLkjMLc5Mh8ifYlSU
\r
63 Euf1AWkWAElklObB9cLS0StGcaBXhHl/grTzAFMZXPcroMFMQIMDOL1BBpckIqSkGhi3Orkf
\r
64 WvM5d4LKWi2eXevLYn+em1s1J3qGW4mse7XLAmOH4l+MagzMChy8Dy78Fl1gJrLu0v8jS79P
\r
65 LdSUra67F7tf+ZFqYERpUfIFx5NVs1YxlD+svHrc4NY9id+Ch9obNzQnu37NNPsmMSHk7MlO
\r
66 GQUxM6UvmZc+Ob0p/2+uoakltdQr/pASS3FGoqEWc1FxIgCy3e1aIgMAAA==
\r
67 Cc: notmuch@notmuchmail.org
\r
68 X-BeenThere: notmuch@notmuchmail.org
\r
69 X-Mailman-Version: 2.1.13
\r
71 List-Id: "Use and development of the notmuch mail system."
\r
72 <notmuch.notmuchmail.org>
\r
73 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
75 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
76 List-Post: <mailto:notmuch@notmuchmail.org>
\r
77 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
78 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
79 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
80 X-List-Received-Date: Wed, 29 Feb 2012 15:48:38 -0000
\r
82 Quoth Justus Winter on Feb 29 at 10:19 am:
\r
83 > Formerly the xapian database object was deleted and closed in its
\r
84 > destructor once the object was garbage collected. Explicitly call
\r
85 > close() so that the database and the associated lock is released
\r
88 Interesting. Is this a bug in Xapian? According to the docs,
\r
89 ~Database is supposed to close the database (if there are no other
\r
90 copies, which there shouldn't be), so this should be redundant with
\r
91 the delete notmuch->xapian_db a few lines down, but your experience
\r
92 obviously suggests that it isn't and I can't find the code path in
\r
93 Xapian that would close it in the destructor.
\r
97 > Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
99 > lib/database.cc | 4 ++++
\r
100 > 1 files changed, 4 insertions(+), 0 deletions(-)
\r
102 > diff --git a/lib/database.cc b/lib/database.cc
\r
103 > index 5efa85e..79cf375 100644
\r
104 > --- a/lib/database.cc
\r
105 > +++ b/lib/database.cc
\r
106 > @@ -726,6 +726,10 @@ notmuch_database_close (notmuch_database_t *notmuch)
\r
110 > + if (notmuch->xapian_db != NULL) {
\r
111 > + notmuch->xapian_db->close();
\r
114 > delete notmuch->term_gen;
\r
115 > delete notmuch->query_parser;
\r
116 > delete notmuch->xapian_db;
\r