unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Mazieres <dm-list-email-notmuch@scs.stanford.edu>
To: "Amadeusz Żołnowski" <aidecoe@aidecoe.name>, notmuch@notmuchmail.org
Subject: Re: muchsync files renames
Date: Sun, 23 Aug 2015 13:06:20 -0700	[thread overview]
Message-ID: <87oahxojlv.fsf@ta.scs.stanford.edu> (raw)
In-Reply-To: <871teu8kdd.fsf@freja.aidecoe.name>

Amadeusz Żołnowski <aidecoe@aidecoe.name> writes:

> Hi David,
>
> Fist of all thank you for such elaborate answer.
>
> I have missed the paragraph about maildir.synchronize_flags somehow.  I
> have it enabled.  So this must be source of a problem (?).

I've only ever tested with mailder.synchronize_flags = true, because I'm
worried that if I disable it I will have a hard time re-enabling it.  I
do think it is a source of inefficiency, but muchsync should still be
usable.

> Here follows steps I followed:
>
> 1. I initialized server locally with muchsync -vv.  My mail is stored in
> ~/Mail on the server.
> 2. I run muchsync --init ~/mail SERVER. (Directory names do not need to
> be the same, do they?)

Confirmed that directory names do not need to be the same.

> 3. I run muchsync SERVER.
> 4. When it lasted much longer then initialization I canceled it by
> single SIGINT (^c).

Interesting.  I wish I knew why this was taking much longer than running
it on the server, and whether the delay was caused by client activity or
server activity.

I don't suppose you'd be willing to make a copy of your mail database to
repeat the experiment without any risk of messing up your real maildir?
Basically what would be interesting to see is (assuming .notmuch-copy on
server is configured for this disposable copy):

    # Log everything for later analysis
    script
    # Use new config file location for disposable copy
    export NOTMUCH_CONFIG=$HOME/.notmuch-copy
    # Set up a new initial database
    muchsync -vvvv --init ~/test-copy SERVER -vvvv --config=.notmuch-copy

    # Now initial copy is made, see if client is slow
    # Is notmuch new itself slow?
    notmuch new
    # Is resynchronizing muchsync with notmuch slow?
    muchsync -vvvv

    # Now see if something weird happened on server to make notmuch new slow
    ssh SERVER notmuch --config=.notmuch-copy new
    # Now see if something weird happened on server to make muchsync slow
    ssh SERVER muchsync -vvvv --config=.notmuch-copy

    # Now finally try resynchronizing to see if this is slow
    muchsync -vvvv SERVER -vvvv --config=.notmuch-copy
    # Save script file
    exit

Does something along these lines make sense?  If you can figure out
which of these is slow (other than --init, which always will be), and
what the verbose chatter is, that would help me narrow down and identify
any problem.

> 5. I rerun muchsync SERVER and then it notified me that notmuch
> identified files names changes - more than 1000.

Were the link changes on the client (sent) or the server (received)
side?

> 6. I waited a bit and then I canceled it by SIGINT.
> 7. I run muchsync --noup SERVER. This took only seconds to finish.

So this suggests the issue is on the client side.  It sounds like a bug.
I wonder if I we can just reproduce this using a public email corpus, so
we don't have to worry about people's private email.

> I suspected that muchsync at step 3 and 5 tried to push files renames
> back to server.  But now I am not sure what was going on.  Have I
> desynchronized file mail flags?  It's hard to say if anything has broken
> for me, but I am a bit worried anyway.
>
> If I just disable maildir.synchronize_flags and rerun muchsync, will
> everything get synchronized properly?

I don't think that will change things.  maildir.synchronized_flags will
make things slower, but it shouldn't affect the SUMMARY numbers you see
at the end of muchsync, other than maybe files moving from .../new to
.../cur.  But presumably most of your mail files were already in cur
directories.

David

  reply	other threads:[~2015-08-23 20:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-22 21:02 muchsync files renames Amadeusz Żołnowski
2015-08-23  5:41 ` David Mazieres
2015-08-23  8:44   ` Amadeusz Żołnowski
2015-08-23 20:06     ` David Mazieres [this message]
2015-08-23 20:43       ` David Mazieres
2015-08-24 22:14         ` Amadeusz Żołnowski
2015-08-26  6:31       ` Amadeusz Żołnowski
     [not found]       ` <87vbbwnbb4.fsf@freja.aidecoe.name>
     [not found]         ` <87io7wr50y.fsf@ta.scs.stanford.edu>
2015-08-31 11:59           ` Amadeusz Żołnowski
2015-08-31 17:27             ` dm-list-email-notmuch
2015-08-31 22:11               ` Amadeusz Żołnowski
2015-08-31 23:43                 ` David Mazieres
2015-09-01 22:52                   ` Amadeusz Żołnowski
2015-09-01 23:20                     ` synchronize_flags leaving files in new (was muchsync files renames) dm-list-email-notmuch
2015-09-02 21:01                       ` Amadeusz Żołnowski
2015-09-02  0:37                     ` muchsync files renames David Bremner
2015-09-02  0:46                       ` dm-list-email-notmuch
2015-09-02 21:21                       ` Amadeusz Żołnowski
2015-09-02 23:05                         ` David Bremner
2015-09-09 17:49                           ` Amadeusz Żołnowski

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=87oahxojlv.fsf@ta.scs.stanford.edu \
    --to=dm-list-email-notmuch@scs.stanford.edu \
    --cc=aidecoe@aidecoe.name \
    --cc=mazieres-f72cdtyxmh2n26c2fbep99wgpw@temporary-address.scs.stanford.edu \
    --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).