Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A0753431FBC for ; Sun, 24 Jan 2010 16:47:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dd1WZkSwKsS2 for ; Sun, 24 Jan 2010 16:47:34 -0800 (PST) Received: from clegg.madduck.net (clegg.madduck.net [193.242.105.96]) by olra.theworths.org (Postfix) with ESMTP id 4569C431FAE for ; Sun, 24 Jan 2010 16:47:34 -0800 (PST) Received: from lapse.rw.madduck.net (leibniz.catalyst.net.nz [202.78.240.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lapse.rw.madduck.net", Issuer "CAcert Class 3 Root" (verified OK)) by clegg.madduck.net (postfix) with ESMTPS id B8B901D4099; Mon, 25 Jan 2010 01:47:23 +0100 (CET) Received: by lapse.rw.madduck.net (Postfix, from userid 1000) id 5FC416C5; Mon, 25 Jan 2010 13:46:59 +1300 (NZDT) Date: Mon, 25 Jan 2010 13:46:59 +1300 From: martin f krafft To: Asheesh Laroia Message-ID: <20100125004659.GA24818@lapse.rw.madduck.net> Mail-Followup-To: Asheesh Laroia , notmuch References: <20100111221909.GA30299@lapse.rw.madduck.net> <1263267603-sup-302@elise> <20100112045152.GA15275@lapse.rw.madduck.net> <20100114203730.GE4691@lapse.rw.madduck.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: X-Motto: Keep the good times rollin' X-OS: Debian GNU/Linux squeeze/sid kernel 2.6.32-trunk-686 i686 X-Spamtrap: madduck.bogus@madduck.net X-Subliminal-Message: debian/rules! User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.95.3 at clegg X-Virus-Status: Clean Cc: notmuch Subject: [notmuch] Git as notmuch object store (was: Potential problem using Git for mail) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 00:47:35 -0000 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable also sprach Asheesh Laroia [2010.01.21.1928 +1300]: > >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. >=20 > 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. There is no way to make that atomic, I am afraid. As you say. > I could probably actually write a wrapper that locks the Maildir > while git is operating. It would probably be specific to each IMAP > server. Ouch! I'd really rather not go there. > Note that this mean git is fundamentally incompatible with > Maildir, not just IMAP servers. We had an idea about using Git to replace IMAP altogether, along with making notmuch use a bare Git repository as object store. The idea is that notmuch uses low-level Git commands to access the .git repository (from which you can still checkout a tree tying the blobs into a Maildir). The benefit would be compression, lower inode count (due to packs), and backups using clones/merges. You could either have the MDA write to a Git repo on the server side and use git packs to download mail to a local clone, or one could have e.g. offlineimap grow a Git storage backend. The interface to notmuch would be the same. If we used this, all the rename and delete code would be refactored into Git and could be removed from notmuch. In addition, notmuch could actually use Git tree objects to represent the results of searches, and you could checkout these trees. However, deleting messages from search results would not have any effect on the message or its existence in other search results, much like what happens with mairix nowadays. I think we all kinda agreed that the Maildir flags should not be used by notmuch and that things like Sebastian's notmuchsync should be used if people wanted flags represented in Maildir filenames. Instead of a Maildir checkout, notmuch could provide an interface to browse the store contents in a way that could make it accessible to mutt. The argument is that with 'notmuch {ls,cat,rm,=E2=80=A6}', a mutt backend could be trivially written. I am not sure about that, but it's worth a try. But there are still good reasons why you'd want to have IMAP capability too, e.g. Webmail. Given the atomicity problems that come =66rom Git, maybe an IMAP server reading from the Git store would make sense. However, this all sounds like a lot of NIH and reinvention. It's a bit like the marriage between the hypothetical Maildir2 and Git, which is definitely worth pursuing. Before we embark on any of this, however, we'd need to define the way in which Git stores mail. Stewart, you've worked most on this so far. Would you like to share your thoughts? --=20 martin | http://madduck.net/ | http://two.sentenc.es/ =20 "reife des mannes, das ist es, den ernst wiedergefunden zu haben, den man hatte als kind beim spiel." -- friedrich nietzsche =20 spamtraps: madduck.bogus@madduck.net --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature; name="digital_signature_gpg.asc" Content-Description: Digital signature (see http://martin-krafft.net/gpg/) Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEAREDAAYFAktc6f0ACgkQIgvIgzMMSnXpgQCfSKQK+ZC5xqzoKKLq9ksNDln7 58wAnittDhnDlFoZPLR8SwZDo5Q+ap2v =Vcry -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--