unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jan Janak <jan@ryngle.com>
To: Carl Worth <cworth@cworth.org>
Cc: notmuch@notmuchmail.org
Subject: Re: Asynchronous tagging
Date: Sat, 21 Nov 2009 21:50:10 +0100	[thread overview]
Message-ID: <f35dbb950911211250u5f0e8c05p56da7be3d48bbba8@mail.gmail.com> (raw)
In-Reply-To: <874oon4pgv.fsf@yoom.home.cworth.org>

On Sat, Nov 21, 2009 at 9:01 PM, Carl Worth <cworth@cworth.org> wrote:
>> 3. I had initially put 'notmuch new' in a cron job (instead of
>> offlineimap postsync hook) and new/search would sometimes complain about
>> missing files in the maildir.  The first time this happened, it did not
>> correct itself and I ended up reimporting the database (I had moved some
>> things around so I could have been at fault).  Since then I have seen
>> these errors on a couple occasions, but they always go away upon
>> rerunning 'notmuch new'.  My guess is that it has to do with offlineimap
>> changing flags so I moved 'notmuch new' to the postsync hook and have
>> not seen the errors since.  If it is important that notmuch never runs
>> concurrently with an offlineimap sync, it should eventually go in the
>> docs.
>
> Thanks for the pointer.
>
> Does offlineimap use tmp while it's delivering message and then move
> things to new? If so, then maybe all we need to do to fix notmuch to not
> look into tmp directories?

Yes, it does. I think all delivery agents work this way, IIRC the
reason why messages are first written in tmp and then moved to new is
to make sure that clients do not see partially written messages.
Maildir has been designed to be lock-less so this is needed.

I get errors about missing files too. There are several reasons why
that can happen:

 1) A message is moved from one folder to another in other mail
clients that work with
    the Maildir spool.

 2) A client changes the flags on a message, for example, when you
read a message or
    mark it as deleted. Maildir stores flags in filenames.

 3) Message flags are updated on the IMAP server (for example when you
mark a message
    as read in gmail). Offlineimap keeps message flags synchronized.
If you mark a
    local message as read then the change is propagated to the IMAP
server and vice
    versa.

 -- Jan

  parent reply	other threads:[~2009-11-21 20:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-21 18:35 Asynchronous tagging Jed Brown
2009-11-21 19:45 ` Jed Brown
2009-11-21 21:00   ` Carl Worth
2009-11-21 21:17     ` Jed Brown
2009-11-21 20:01 ` Carl Worth
2009-11-21 20:43   ` Karl Wiberg
2009-11-21 20:48   ` Jed Brown
2009-11-21 20:50   ` Jan Janak [this message]
2009-11-21 21:04     ` Jed Brown
2009-11-21 21:15       ` Jan Janak
2009-11-21 22:46       ` Carl Worth
2009-11-22  0:16         ` Keith Packard

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=f35dbb950911211250u5f0e8c05p56da7be3d48bbba8@mail.gmail.com \
    --to=jan@ryngle.com \
    --cc=cworth@cworth.org \
    --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).