Re: [RFC patch 2/2] lib: handle DatabaseModifiedError in _n_message_ensure_metadata

Subject: Re: [RFC patch 2/2] lib: handle DatabaseModifiedError in _n_message_ensure_metadata

Date: Fri, 24 Feb 2017 07:40:00 -0400

To: Gaute Hope, notmuch@notmuchmail.org

Cc:

From: David Bremner


Gaute Hope <eg@gaute.vetsj.com> writes:

> David Bremner writes on februar 24, 2017 3:49:
>> David Bremner <david@tethera.net> writes:
>> 
>>> The error handling here still needs work. The retry count should be
>>> handled in more sane way, and both running out of retries and an error
>>> return from notmuch_database_reopen should be handled.
>> 
>> Probably the number of retries can be limited to 1, since afaict, reopen
>> is not going to return any recoverable errors.
>
> Does _reopen block if the db is locked?

It's not documented to block or throw an exception in that case. It's
only applicable to read-only databases, so the lack of blocking makes
sense.

d

Thread: