Lost updates to Notmuch database

Eric J eric at deptj.eu
Sun Feb 21 04:57:30 PST 2016


On Wed, 17 Feb 2016 21:44:23 +0100 (CET), Eric J <eric at deptj.eu> wrote:
> Using the API, I am adding single mail files, already in the maildir, to
> the Notmuch database and tagging them. It works, every time, as long as
> I run it one file at a time. 
> 
> However, if I do it twice, in different processes, at the same time, one
> file is added and tagged properly, the other is not (totally unfindable
> by notmuch search). Neither process reports any error, and they both log
> their actions normally. Actually a third simultaneous process also fails
> to leave any result in the database.
8>< --------
> 
> The wrapper around the API for Tcl is very simple, and I can not see any
> way for that or Tcl itself to cause this sort of problem. Beyond this,
> I haven't thought of any way to decide if this could be a Notmuch problem
> or a Xapian problem.
8>< --------

Well, after some experimenting, this is not specific to Notmuch at all.
Xapian itself has Tcl bindings, and they also silently fail to lock the
file. So does putting a minimally changed copy of Xapian's locking code
directly in a Tcl extension, though that code works when called from a
tiny C main program instead.

So thanks for looking, I will report here if I find out why.

Eric
-- 
ms fnd in a lbry


More information about the notmuch mailing list