On 22.5.2004, at 06:46, Christian Balzer wrote:
Timo wrote (hmm, given the usual programmers life style I'd say VERY late at nigth :) :
Just went to bed, now just the last few things.. :)
User has a client at home to auto-download (but leave mails on server) and is using a slow link, so those message downloads take a quite measurable time. Now he logs into webmail (which of course also ultimately uses dovecot to access the mailbox) and deletes a message which is currently in transit to his home machine. Will the result be: a) The "read" of that message has triggered an internal dovecot lock and the "write" of the delete will have to wait until this is released.
Dovecot read-locks the mailbox while it's reading a mail, so this one happens.
b) The delete happens immediately, but thanks to buffering the read and delivery of the message is always successfully finished.
Something like this would happen with maildir.
c) The delete of the message happens immediately, the state of the message in transit is indeterminable and it might be truncated.
And this would happen if you didn't set the locking correctly :)