notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new?

Subject: notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new?

Date: Fri, 06 Jun 2014 10:03:54 +0200

To: notmuch@notmuchmail.org

Cc:

From: Maarten Aertsen


Hi everyone,

(summary of IRC-conversation just now)
I did:
  - run notmuch new (and afew -t) in cron, every two minutes
  - run notmuch dump in cron, every 12 hours

I expected:
  - notmuch dump to complete, possibly causing notmuch new to fail in the meantime

I observed:
  - notmuch dump terminating with:
"terminate called after throwing an instance of 'Xapian::DatabaseModifiedError'"

mjw1009 suggested to change NOTMUCH_DATABASE_MODE_READ_ONLY on line
215 of notmuch-dump.c to NOTMUCH_DATABASE_MODE_READ_WRITE

I'm wondering if this hits enough people to motivate the addition of a
command line switch (or perhaps even a change in default behaviour?)

Thanks for writing this software.

best regards, Maarten

Thread: