From: "W. Trevor King" <wking@tremily.us>
To: Austin Clements <aclements@csail.mit.edu>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH v4] lib: Simplify close and codify aborting atomic section
Date: Thu, 2 Oct 2014 13:48:00 -0700 [thread overview]
Message-ID: <20141002204800.GS3770@odin.tremily.us> (raw)
In-Reply-To: <87k34idx4i.fsf@csail.mit.edu>
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
On Thu, Oct 02, 2014 at 04:39:41PM -0400, Austin Clements wrote:
> On Thu, 02 Oct 2014, W. Trevor King wrote:
> > On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote:
> >> This patch simplifies notmuch_database_close to explicitly abort
> >> any outstanding transaction and then just call Database::close.
> >> This works for both read-only and read/write databases, takes
> >> care of committing changes, unifies the exception handling path,
> >> and codifies aborting outstanding transactions.
> >
> > I don't expect atomic blocks are particularly useful for read-only
> > connections. If they aren't, I'd quibble with the “This works for
> > both read-only…” wording above. If they are, I'd drop the
> > read/write
>
> It's true that atomic sections aren't very useful on a read-only
> database, but we do allow them for symmetry.
Heh, and they're no-ops since the beginning in 957f1ba3 (lib: Add
notmuch_database_{begin,end}_atomic, 2011-01-29). So both the commit
message and read/write check make sense. Quibble retracted.
Cheers,
Trevor
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-10-02 20:48 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
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 [this message]
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=20141002204800.GS3770@odin.tremily.us \
--to=wking@tremily.us \
--cc=aclements@csail.mit.edu \
--cc=notmuch@notmuchmail.org \
/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).