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