Lost updates to Notmuch database

Eric J eric at deptj.eu
Sat Feb 27 12:04:41 PST 2016


On Sun, 21 Feb 2016 13:57:30 +0100 (CET), Eric J <eric at deptj.eu> wrote:
> 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.

Well, this seems to be a Tcl problem, not present in 8.5, but present in
8.6, up until the very new 8.6.5rc2, where it seems to work. Sadly, I
still have no explanation of the problem.

Eric
-- 
ms fnd in a lbry


More information about the notmuch mailing list