From: Asheesh Laroia <asheesh@asheesh.org>
To: martin f krafft <madduck@madduck.net>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: Potential problem using Git for mail (was: Idea for storing tags)
Date: Thu, 21 Jan 2010 01:28:50 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.00.1001210124590.24778@localhost> (raw)
In-Reply-To: <20100114203730.GE4691@lapse.rw.madduck.net>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2038 bytes --]
On Fri, 15 Jan 2010, martin f krafft wrote:
> also sprach Asheesh Laroia <asheesh@asheesh.org> [2010.01.14.2112 +1300]:
>> Sure. But the MDA doesn't need to do the commit immediately. Since
>> (presumably) we're using Maildir, the MDA on the mail receiving
>> server is going to generate filenames that won't cause conflicts.
>> So it's okay to leave the files uncommitted.
>
> So when does the commit happen?
>
>> When I did the "git merge", git would create the Maildir files in
>> ~/Maildir/cur/... non-atomically.
>
> This might be something that the Git people could address if it was
> brought up on the mailing list. Then again, it might not be possible
> without going via a temporary file, which I doubt will fly.
A temporary file + rename() is the only way, as far as I know.
> I suppose that I never actually considered merges on the IMAP server
> side, but obviously the IMAP server has to work off a clone, and that
> means it needs to merge.
It's not "merge" that's unsafe; that just builds a tree in the git index
(assuming no conflicts). It's the ensuing process of git writing a tree to
the filesystem that is problematic.
I could probably actually write a wrapper that locks the Maildir while git
is operating. It would probably be specific to each IMAP server.
Note that this mean git is fundamentally incompatible with Maildir, not
just IMAP servers.
>> Dovecot would notice the file in ~/Maildir/cur/ and think, "This file
>> must be ready!" So it would parse it even though git hadn't finished
>> writing it. This caused me to only see partial headers in Alpine since
>> Dovecot parsed it before it was a complete message.
>
> I wonder if a custom merge driver could address this to properly use
> …/tmp/ to assemble the message and only then move it.
I don't think a merge driver can do it for the reason stated above.
-- Asheesh.
--
I always turn to the sports pages first, which record people's accomplishments.
The front page has nothing but man's failures.
-- Chief Justice Earl Warren
next prev parent reply other threads:[~2010-01-21 6:29 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 22:19 Idea for storing tags martin f krafft
2010-01-12 3:44 ` Scott Robinson
2010-01-12 4:06 ` martin f krafft
2010-01-12 4:51 ` Potential problem using Git for mail (was: Idea for storing tags) martin f krafft
2010-01-12 19:38 ` Jameson Rollins
2010-01-12 19:55 ` martin f krafft
2010-01-14 8:12 ` Asheesh Laroia
2010-01-14 20:37 ` martin f krafft
2010-01-21 6:28 ` Asheesh Laroia [this message]
2010-01-25 0:46 ` Git as notmuch object store (was: Potential problem using Git for mail) martin f krafft
2010-01-25 5:19 ` Asheesh Laroia
2010-01-25 7:43 ` martin f krafft
2010-01-25 13:49 ` Sebastian Spaeth
2010-01-25 16:22 ` Mike Kelly
2010-01-25 21:46 ` tag dir proposal [was: Re: Git as notmuch object store] Jameson Rollins
2010-01-26 16:32 ` Scott Robinson
2010-01-26 17:03 ` Jameson Rollins
2010-01-28 5:12 ` martin f krafft
2010-01-28 5:28 ` James Westby
2010-01-28 5:34 ` martin f krafft
2010-01-28 6:22 ` James Westby
2010-01-28 9:55 ` martin f krafft
2010-01-28 5:10 ` martin f krafft
2010-01-28 12:32 ` Servilio Afre Puentes
2010-01-28 20:39 ` martin f krafft
2010-01-28 20:49 ` Ben Gamari
2010-01-28 21:11 ` martin f krafft
[not found] ` <1264713802-sup-620@ben-laptop>
[not found] ` <20100128221735.GE8942@lapse.rw.madduck.net>
2010-01-28 23:30 ` Ben Gamari
2010-01-28 21:16 ` Jed Brown
2010-01-25 19:49 ` Git as notmuch object store (was: Potential problem using Git for mail) martin f krafft
2010-01-27 9:00 ` Sebastian Spaeth
2010-02-15 0:51 ` Stewart Smith
2010-01-12 4:11 ` Idea for storing tags Scott Morrison
2010-01-13 1:24 ` martin f krafft
2010-01-13 5:39 ` Scott Morrison
2010-01-13 5:52 ` martin f krafft
2010-01-14 1:37 ` Carl Worth
2010-01-12 21:39 ` David A. Harding
2010-01-14 1:32 ` Carl Worth
2010-01-14 8:04 ` martin f krafft
2010-01-14 22:24 ` Carl Worth
2010-01-14 22:32 ` martin f krafft
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=alpine.DEB.2.00.1001210124590.24778@localhost \
--to=asheesh@asheesh.org \
--cc=madduck@madduck.net \
--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).