[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 codi

Re: [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 codi

[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 da

[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 (and unnecessarily)

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 cal

[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 cal

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" 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 da

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, unifie

[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, unifie

[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 (and unnecessarily)