Re: RFC: Dovecot locking
authorRob Browning <rlb@defaultvalue.org>
Sun, 20 Feb 2011 18:47:32 +0000 (12:47 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:55 +0000 (09:37 -0800)
df/a38a7f19ef3b6bfa0e1f8698f3eb6dc4a8ef81 [new file with mode: 0644]

diff --git a/df/a38a7f19ef3b6bfa0e1f8698f3eb6dc4a8ef81 b/df/a38a7f19ef3b6bfa0e1f8698f3eb6dc4a8ef81
new file mode 100644 (file)
index 0000000..18d936a
--- /dev/null
@@ -0,0 +1,86 @@
+Return-Path: <rlb@defaultvalue.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 47044431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 20 Feb 2011 10:47:38 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id xmj32+yVCwAM for <notmuch@notmuchmail.org>;\r
+       Sun, 20 Feb 2011 10:47:35 -0800 (PST)\r
+Received: from defaultvalue.org (defaultvalue.org [70.85.129.156])\r
+       by olra.theworths.org (Postfix) with ESMTP id 93211431FB5\r
+       for <notmuch@notmuchmail.org>; Sun, 20 Feb 2011 10:47:35 -0800 (PST)\r
+Received: from omen.defaultvalue.org (localhost [127.0.0.1])\r
+       by defaultvalue.org (Postfix) with ESMTP id 1DC5290D35\r
+       for <notmuch@notmuchmail.org>; Sun, 20 Feb 2011 12:47:51 -0600 (CST)\r
+Received: from raven.defaultvalue.org (raven.defaultvalue.org [192.168.1.7])\r
+       by omen.defaultvalue.org (Postfix) with ESMTP id 185F65018F\r
+       for <notmuch@notmuchmail.org>; Sun, 20 Feb 2011 12:47:33 -0600 (CST)\r
+Received: by raven.defaultvalue.org (Postfix, from userid 1000)\r
+       id 053D47BA2C5; Sun, 20 Feb 2011 12:47:32 -0600 (CST)\r
+From: Rob Browning <rlb@defaultvalue.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: RFC: Dovecot locking\r
+References: <87zkpvv01u.fsf@trouble.defaultvalue.org>\r
+       <87r5b5e3qm.fsf@raven.defaultvalue.org>\r
+Date: Sun, 20 Feb 2011 12:47:32 -0600\r
+In-Reply-To: <87r5b5e3qm.fsf@raven.defaultvalue.org> (Rob Browning's message\r
+       of "Fri, 18 Feb 2011 09:56:01 -0600")\r
+Message-ID: <87wrku5yrf.fsf@raven.defaultvalue.org>\r
+User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 20 Feb 2011 18:47:38 -0000\r
+\r
+Rob Browning <rlb@defaultvalue.org> writes:\r
+\r
+> Rob Browning <rlb@defaultvalue.org> writes:\r
+>\r
+>> This is an unfinished patch to handle Dovecot locking, which is useful\r
+>> if we'd like to support running notmuch directly on a Dovecot Maildir:\r
+>>\r
+>>   http://wiki.dovecot.org/MailboxFormat/Maildir#Locking\r
+>>\r
+>> For now, I'm interested in general comments, i.e. is this desirable, is\r
+>> it a reasonable approach, etc.  As you can see, there's no config\r
+>> handling yet, so -llockfile is added unconditionally.\r
+>\r
+> Oh, and as Austin reminded me, I forgot to mention that liblockfile may\r
+> or may not be appropriate (algorithmically).  I'm planning to check and\r
+> see how Dovecot handles stale files -- lockfile_create() assumes that\r
+> any file older than five minutes is stale.\r
+\r
+It looks like dovecot's interval is 10 seconds, so for this to work\r
+right, notmuch will need to call lockfile_touch() more often than that.\r
+\r
+  /* How often to touch the uidlist lock file when it's locked.\r
+     This is done both when using KEEP_LOCKED flag and when syncing a large\r
+     maildir. */\r
+  #define MAILDIR_LOCK_TOUCH_SECS 10\r
+\r
+As yet, I don't know if that's likely to be easy to add.\r
+\r
+Thanks\r
+-- \r
+Rob Browning\r
+rlb @defaultvalue.org and @debian.org\r
+GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4\r