From: Eric J <eric@deptj.eu>
To: notmuch@notmuchmail.org
Subject: Re: Lost updates to Notmuch database
Date: Thu, 18 Feb 2016 13:59:28 +0100 (CET) [thread overview]
Message-ID: <ae82f004d3f4e2710f74ee6437a2041c05f41588-NM@bruno.deptj.eu> (raw)
In-Reply-To: <871t8avnhq.fsf@zancas.localnet>
On Wed, 17 Feb 2016 21:03:13 -0400, David Bremner <david@tethera.net> wrote:
> Eric J <eric@deptj.eu> writes:
>
> > 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.
>
> It should be impossible for more than one process to open a Xapian
> database for writing at the same time. So if the processes are really
> running in parallel, you should be getting error codes from the later
> calls to notmuch_database_open{_verbose}. You claim that's not
> happening, which is puzzling. Maybe you can try to duplicate your
> problem with a tiny C program.
Thanks David. Impossible? - yes, but if I do just the open in two
interactive sessions (the Tcl interface makes this easy), I get the
following from "lsof flintlock":
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
cat 21408 eric 5w REG 8,9 0 667773 flintlock
cat 21418 eric 5w REG 8,9 0 667773 flintlock
So, open for writing, but not locked (the processes have the right
parents).
I managed to catch a run of "notmuch new" with "lsof -r5 flintlock":
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
cat 20763 eric 3ww REG 8,9 0 667773 flintlock
which is open for writing and (partially) locked, so it must be doing
something that I'm not. I obviously need to go carefully through the
code to see what that is (and experiment in C if I can't find it!).
I don't have the _verbose functions BTW, still on 0.18.1 - I thought I
would get a proof-of-concept before upgrading notmuch, but...
Thanks again,
Eric
--
ms fnd in a lbry
next prev parent reply other threads:[~2016-02-18 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 20:44 Lost updates to Notmuch database Eric J
2016-02-18 1:03 ` David Bremner
2016-02-18 12:59 ` Eric J [this message]
2016-02-18 14:30 ` Tomi Ollila
2016-02-18 21:26 ` Eric J
2016-02-21 12:57 ` Eric J
2016-02-27 20:04 ` Eric J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae82f004d3f4e2710f74ee6437a2041c05f41588-NM@bruno.deptj.eu \
--to=eric@deptj.eu \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).