On 17.4.2013, at 13.19, Thomas Hummel <hum...@pasteur.fr> wrote:

> On Tue, Apr 16, 2013 at 02:00:38PM +0300, Timo Sirainen wrote:
> 
>> The worst that can happen is:
>> 
>> 1) Client sees new mail 123 in old server
>> 2) Client sees only mails up to 122 in the new server
>> 3) Client again will see mail 123 after a while
>> 
>> I'm actually not sure how clients will handle that. It is an IMAP
>> protocol violation. 
> 
> Why is it a protocol violation ? if new was up to 122, nextuid would have been
> 123 so what's the problem, protocol wise, to see 123 come later ?

Because client saw uidnext=124 on the old server, which shrank back to 
uidnext=123 on the new server. That shouldn't happen even temporarily.

> Of course if a new mail is delivered in new as 123, there 's a conflict.  But
> as you said dsync knows how to handle this and would assign new uids to both
> and the client, as you said, could get confused about what he thought was 123.
> But even in that case, wouldn't he see the message (as a new one with it's 
> new uid) ?
> I mean, nothing would be "lost" ?

Yeah, when conflicts are fixed nothing gets lost. In that "worst case" I 
mentioned there's no conflict really, just a message that disappears and 
appears back. Hmm. Maybe Dovecot should keep track of what messages IMAP 
clients have seen, and automatically figure out when it should change UIDs in 
those cases.

Reply via email to