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 0E48B431FBD for ; Wed, 24 Sep 2014 11:09:48 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 MHp51RKLrlpb for ; Wed, 24 Sep 2014 11:09:40 -0700 (PDT) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3893B431FAF for ; Wed, 24 Sep 2014 11:09:40 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1XWr0P-0001WY-1m; Wed, 24 Sep 2014 15:09:33 -0300 Received: (nullmailer pid 12507 invoked by uid 1000); Wed, 24 Sep 2014 18:09:27 -0000 From: David Bremner To: "W. Trevor King" , Austin Clements Subject: Re: [PATCH] lib: Simplify close and codify aborting atomic section In-Reply-To: <20140922190022.GO20827@odin.tremily.us> References: <1411400615-20934-1-git-send-email-amdragon@mit.edu> <20140922165954.GI20827@odin.tremily.us> <20140922185050.GB7970@csail.mit.edu> <20140922190022.GO20827@odin.tremily.us> User-Agent: Notmuch/0.18.1+98~gae27403 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Wed, 24 Sep 2014 20:09:27 +0200 Message-ID: <87iokc28mg.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain Cc: notmuch@notmuchmail.org 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: Wed, 24 Sep 2014 18:09:48 -0000 "W. Trevor King" writes: > Ah, I thought the implicit flush/commit was just in our code. Since > it's also in the underlying Xapian close, then this patch looks pretty > good to me. I'd mention Xapian's explicit close in the notmuch. h > message. Xapain's docs say [1]: > > For a WritableDatabase, if a transaction is active it will be > aborted, while if no transaction is active commit() will be > implicitly called. I'm not sure what you're asking for here by "explicit close". Isn't what you quote a restatement of + * If the caller is currently in an atomic section (there was a + * notmuch_database_begin_atomic without a matching + * notmuch_database_end_atomic), this will abort the atomic section, + * discarding any modifications made in the atomic section. in terms of underyling Xapian mechanics? P.S. Other than whatever this doc question is, the patch looks ok to me.