Re: CONDSTORE: STORE UNCHANGEDSINCE 0

Bron Gondwana <brong@fastmail.fm> Fri, 14 March 2008 00:29 UTC

Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.14.2/8.14.2) with ESMTP id m2E0TsB0008203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Mar 2008 17:29:54 -0700 (MST) (envelope-from owner-ietf-imapext@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.14.2/8.13.5/Submit) id m2E0Tsp2008202; Thu, 13 Mar 2008 17:29:54 -0700 (MST) (envelope-from owner-ietf-imapext@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-imapext@mail.imc.org using -f
Received: from paragon.brong.net (paragon.brong.net [74.52.187.94]) by balder-227.proper.com (8.14.2/8.14.2) with ESMTP id m2E0TqNC008187 for <ietf-imapext@imc.org>; Thu, 13 Mar 2008 17:29:53 -0700 (MST) (envelope-from brong@ravna.brong.net)
Received: from ravna (ravna.brong.net [192.168.203.4]) by paragon.brong.net (Postfix) with ESMTP id 6D2E33437F; Fri, 14 Mar 2008 00:29:40 +0000 (UTC)
Received: by ravna (Postfix, from userid 1000) id 123A050EE3; Fri, 14 Mar 2008 11:15:34 +1100 (EST)
Date: Fri, 14 Mar 2008 11:15:35 +1100
From: Bron Gondwana <brong@fastmail.fm>
To: Timo Sirainen <tss@iki.fi>
Cc: Alexey Melnikov <alexey.melnikov@isode.com>, IMAP Extensions WG <ietf-imapext@imc.org>
Subject: Re: CONDSTORE: STORE UNCHANGEDSINCE 0
Message-ID: <20080314001534.GB11218@brong.net>
References: <4553EEEF.8020206@isode.com> <1205398181.11220.932.camel@hurina> <47D94EE1.4030108@isode.com> <BA538D4B-36AB-4A70-B960-0D69CC0A8BB0@iki.fi>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <BA538D4B-36AB-4A70-B960-0D69CC0A8BB0@iki.fi>
Organization: brong.net
User-Agent: Mutt/1.5.16 (2007-06-11)
Sender: owner-ietf-imapext@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-imapext/mail-archive/>
List-ID: <ietf-imapext.imc.org>
List-Unsubscribe: <mailto:ietf-imapext-request@imc.org?body=unsubscribe>

On Thu, Mar 13, 2008 at 06:31:34PM +0200, Timo Sirainen wrote:
> On Mar 13, 2008, at 5:57 PM, Alexey Melnikov wrote:
>
>> Timo Sirainen wrote:
>>
>>> What happened to this?
>>>
>> I need to publish CONDSTOREbis draft at some point which contains the fix. 
>> I don't have time or energy to do this now. I should find some time once 
>> all my Lemonade drafts are approved for publication.
>
> Are there going to be other changes? The main problem I currently have 
> implementing CONDSTORE is that I'd rather not want to figure out 
> HIGHESTMODSEQ value when selecting a mailbox unless I know the client wants 
> to use CONDSTORE. I started to wonder if it would work nicely if a SELECT 
> mailbox returned [NOMODSEQ] but the first CONDSTORE enabling command would 
> cause * OK [HIGHESTMODSEQ n] to be sent.

How do you calculate the MODSEQ if you're not using some sort of fast,
atomically incrementable counter?

I guess it would be viable to store a "changed timestamp" or something,
and then lazily calculate a modseq only when something using CONDSTORE
viewed the mailbox - but that sounds pretty messy and potentially
expensive.  I've only read the Cyrus implementation, but it makes sense
in that it has a per-mailbox highestmodseq which gets updated while
the mailbox index is locked (hence the atomic bit) and the index records
themselves all have a modseq value which gets created/updated on any
store/append action.

My initial reaction to CONDSTORE when I saw it go in Cyrus was lukewarm,
but having recently actually tried to figure out the distribution of
bandwidth use on our servers (FastMail.FM) we have discovered that IMAP
TAG UID FETCH 1:* (FLAGS) calls are a huge part of our traffic.  It's a
big pain that in vanilla IMAP there's no way for a client to say "tell
me what has changed" on a 200k message mailbox.  I'd like to see
CONDSTORE used more generally now!

Regards,

Bron.