On 2.6.2012, at 7.27, Bron Gondwana wrote:

>> It doesn't need to be an extra roundtrip. You can run uidexpunge even if 
>> store fails and it doesn't do anything bad. By avoiding the extra roundtrip 
>> it is possible for the server to optimize the STORE+EXPUNGE into equivalent 
>> of ERASE. (Dovecot does halfway that - it for example doesn't rename maildir 
>> files on STORE stage, just unlinks them on EXPUNGE.)
> 
> Not so easy if you want to delete the messages by sequence number of
> course.
> 
> TAG ERASE 1:10
> 
> Isn't implementable as a pipelined command, it would have to be
> 
> TAG1 STORE 1:10 +Flags \Deleted
> TAG2 UID EXPUNGE UID1,UID2,UID3,UID4,UID5..UID10

It can still be pipelined. You would of course need to know the UIDs.

> So how does Dovecot handle a crash or filesystem error during that
> intermediate stage?  Replay an action log?  

Yes.

> What if the file can't
> be renamed, but it's already replied to a client saying "yes, your
> flag store succeeded"?

The message gets marked as having "dirty flags" meaning the flags in index file 
should be used instead of the flags in maildir file.
_______________________________________________
imap5 mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/imap5

Reply via email to