[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-03 Thread David Bremner
Austin Clements writes: > 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

Re: [PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-03 Thread David Bremner
Austin Clements acleme...@csail.mit.edu writes: 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

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
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

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
From: Austin Clements In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
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

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
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,

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
From: Austin Clements amdra...@mit.edu In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly

Re: [PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
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

Re: [PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
On Thu, 02 Oct 2014, W. Trevor King wk...@tremily.us 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

Re: [PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
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