Re: [RFC] Split notmuch_database_close into two functions
authorAustin Clements <amdragon@MIT.EDU>
Sun, 1 Apr 2012 03:23:23 +0000 (23:23 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:57 +0000 (09:45 -0800)
d6/7a958179165a4ff3e4b3f9e1a5fa68d1437b66 [new file with mode: 0644]

diff --git a/d6/7a958179165a4ff3e4b3f9e1a5fa68d1437b66 b/d6/7a958179165a4ff3e4b3f9e1a5fa68d1437b66
new file mode 100644 (file)
index 0000000..a03a36c
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id D4B1A431E82\r
+       for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 20:23:29 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id CCtt3O6dNdY9 for <notmuch@notmuchmail.org>;\r
+       Sat, 31 Mar 2012 20:23:29 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4BB43431FAF\r
+       for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 20:23:29 -0700 (PDT)\r
+X-AuditID: 12074422-b7fd66d0000008f9-27-4f77ca2e907a\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id AC.0C.02297.E2AC77F4; Sat, 31 Mar 2012 23:23:26 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q313NP9U008716; \r
+       Sat, 31 Mar 2012 23:23:25 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q313NNNk011529\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sat, 31 Mar 2012 23:23:24 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1SEBNz-0000cq-Dp; Sat, 31 Mar 2012 23:23:23 -0400\r
+Date: Sat, 31 Mar 2012 23:23:23 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Justus Winter <4winter@informatik.uni-hamburg.de>\r
+Subject: Re: [RFC] Split notmuch_database_close into two functions\r
+Message-ID: <20120401032323.GH5949@mit.edu>\r
+References:\r
+ <1332291311-28954-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To:\r
+ <1332291311-28954-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IRYrdT19U7Ve5vsP6AjMXs1h9MFtdvzmR2\r
+       YPKYeP40m8ezVbeYA5iiuGxSUnMyy1KL9O0SuDKu7XrCWjCPreL5vyksDYzdrF2MnBwSAiYS\r
+       V3ftZYOwxSQu3FsPZHNxCAnsY5Q4+eoJE4SzgVHi2puDUM5JJokVr0+zQDhLGCWmX+4C62cR\r
+       UJVYu/42I4jNJqAhsW3/cjBbRMBUYsODB+wgNrOAtMS3381MILawgJPEmguTwOK8AtoSHe03\r
+       wWwhgUCJnuuP2SDighInZz5hgejVkrjx7yVQLwfYnOX/OEDCnAJBEqtnLQYrERVQkZhychvb\r
+       BEahWUi6ZyHpnoXQvYCReRWjbEpulW5uYmZOcWqybnFyYl5eapGuqV5uZoleakrpJkZwYLso\r
+       7WD8eVDpEKMAB6MSD6/WjHJ/IdbEsuLK3EOMkhxMSqK8044DhfiS8lMqMxKLM+KLSnNSiw8x\r
+       SnAwK4nwdq8u8RfiTUmsrEotyodJSXOwKInzqmu98xMSSE8sSc1OTS1ILYLJynBwKEnw2pwE\r
+       GipYlJqeWpGWmVOCkGbi4AQZzgM03BCkhre4IDG3ODMdIn+KUVFKnNcLJCEAksgozYPrhSWe\r
+       V4ziQK8I85qCVPEAkxZc9yugwUxAg5l5Qa4uLklESEk1MMoKOJrEB5j5H4i+JMf8XCHirpja\r
+       h3mMFw47XX+zo0fd54nJmVgmkYU/TkT/Pu8vLLVrwgnbncoHF50/eelAvEnnm97Ahc9u9M1q\r
+       ltJ3snj58U33XrkStptbHl05V3eC82vI59ovl1Tl9Va8sDq3KKBX85SrbuAqs4I/XbpBb+Se\r
+       GPq3H1vWlK/EUpyRaKjFXFScCAC1keNFFwMAAA==\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 01 Apr 2012 03:23:30 -0000\r
+\r
+Quoth Justus Winter on Mar 21 at  1:55 am:\r
+> I propose to split the function notmuch_database_close into\r
+> notmuch_database_close and notmuch_database_destroy so that long\r
+> running processes like alot can close the database while still using\r
+> data obtained from queries to that database.\r
+\r
+Is this actually safe?  My understanding of Xapian::Database::close is\r
+that, once you've closed the database, basically anything can throw a\r
+Xapian exception.  A lot of data is retrieved lazily, both by notmuch\r
+and by Xapian, so simply having, say, a notmuch_message_t object isn't\r
+enough to guarantee that you'll be able to get data out of it after\r
+closing the database.  Hence, I don't see how this interface could be\r
+used correctly.\r
+\r
+Maybe you could describe your use case in more detail?\r