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

Maarten Aertsen sagi-notmuch at rtsn.nl
Fri Jun 6 01:03:54 PDT 2014


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


More information about the notmuch mailing list