On Mar 14, 2008, at 2:15 AM, Bron Gondwana wrote:
Are there going to be other changes? The main problem I currently haveimplementing CONDSTORE is that I'd rather not want to figure outHIGHESTMODSEQ 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 wouldcause * OK [HIGHESTMODSEQ n] to be sent.How do you calculate the MODSEQ if you're not using some sort of fast, atomically incrementable counter?
Dovecot writes all metadata changes to a transaction log. I use the log file number + offset for the change as the modseq. When CONDSTORE is first enabled I go through the existing log file(s) and calculate modseqs for each message. Modseqs are sometimes later stored to main index so this scanning doesn't have to be done all the time.
So the main problem is that before CONDSTORE is enabled, I don't keep track of the offset of last flag change (or expunge after QRESYNC is implemented) and I can't return a reliable HIGHESTMODSEQ. This is of course fixable in a few different ways, but if there are no real clients that delay announcing their CONDSTORE needs it seems kind of a waste of effort.
Description: This is a digitally signed message part