15 Mar
2008
15 Mar
'08
5:06 p.m.
On Thu, 2008-03-13 at 17:57 +0200, Timo Sirainen wrote:
I wrote a mostly-working CONDSTORE support for Dovecot today. You can try it with:
Recreated the repository, delete the old one and pull it again.
- STORE FLAGS.SILENT should be sending FETCH MODSEQ updates
Fixed.
- When SELECTing a mailbox while CONDSTORE hasn't yet been enabled in the session, Dovecot returns a higher HIGHESTMODSEQ than what's used after CONDSTORE is enabled. This is because modseqs aren't tracked until client has told us that it wants them. So Dovecot doesn't waste time trying to figure out the correct HIGHESTMODSEQ.. Something probably should be done about this.
Fixed.
- STORE (UNCHANGEDSINCE xx) doesn't work correctly. The full fix would require adding a new transaction log record type containing the modseq, but currently it doesn't even bother refreshing the mailbox state before checking what the modseqs are.
Not fixed.
Also:
- If CONDSTORE isn't enabled before mailbox is selected and then CONDSTORE enabling command is sent, send latest HIGHESTMODSEQ to client.
QRESYNC would require keeping track of expunges. This could be implemented by just going through records in log files to find out what messages have been expunged since the given modseq (= log seq+offset).
Implemented it this way. Some issues left with it:
- CLOSE and EXPUNGE always sends HIGHESTMODSEQ, shouldn't be needed if nothing was expunged
- CLOSE [HIGHESTMODSEQ] has race condition (just wrote about it to Lemonade list)
- SELECT with seqset+uidset parameters does only the minimal expunge restriction described by the spec. It would be possible to do it better, but I spent too much time trying to figure out the algorithm at the same time as coding it and it didn't really work. So looks like I'll have to think about it properly first before trying to implement it. :)