unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: "W. Trevor King" <wking@tremily.us>, Austin Clements <amdragon@mit.edu>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] lib: Simplify close and codify aborting atomic section
Date: Wed, 24 Sep 2014 20:09:27 +0200	[thread overview]
Message-ID: <87iokc28mg.fsf@maritornes.cs.unb.ca> (raw)
In-Reply-To: <20140922190022.GO20827@odin.tremily.us>

"W. Trevor King" <wking@tremily.us> 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.

  reply	other threads:[~2014-09-24 18:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 15:43 [PATCH] lib: Simplify close and codify aborting atomic section Austin Clements
2014-09-22 16:59 ` W. Trevor King
2014-09-22 18:50   ` Austin Clements
2014-09-22 19:00     ` W. Trevor King
2014-09-24 18:09       ` David Bremner [this message]
2014-09-24 18:18         ` W. Trevor King
2014-09-24 19:25           ` David Bremner
2014-09-24 19:44             ` W. Trevor King
2014-09-24 20:13               ` David Bremner
2014-09-24 20:29                 ` W. Trevor King
2014-09-24 21:20 ` [PATCH v2] " Austin Clements
2014-09-24 21:28   ` W. Trevor King
2014-09-24 21:32     ` [PATCH v3] " Austin Clements
2014-09-24 21:39       ` W. Trevor King
2014-10-02 19:18         ` Austin Clements
2014-10-02 19:19           ` [PATCH v4] " Austin Clements
2014-10-02 19:41             ` W. Trevor King
2014-10-02 20:39               ` Austin Clements
2014-10-02 20:48                 ` W. Trevor King
2014-10-03  8:48             ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iokc28mg.fsf@maritornes.cs.unb.ca \
    --to=david@tethera.net \
    --cc=amdragon@mit.edu \
    --cc=notmuch@notmuchmail.org \
    --cc=wking@tremily.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).