> Alternatively, have a share count in the index file along with an
> "expunged" flag.  As each process that has the mailbox
> selected notes the
> message as being expunged, decrement the share count.  When the share
> count reaches zero, it is then safe to delete the message.
>
> The update on the index file to clean up the zero-share-count expunged
> message can be deferred until some process gets an exclusive
> lock on it.

I'm afraid that I can see issues with this and would like to know how
you handle it.

Client A connects and does a long fetch of all the flags (takes say 20s)
Client B connects and does a store 1:* /deleted followed by expunge
meanwhile Client C connect and does a store 1:* /seen

Now the mailbox is locked for 20s and all 3 command sequences are
concurrent (started at the same time)
During that time the messages have been flagged as deleted, untagged and
expunged

Questions?
1. are the messages flagged or not?
2. Are they expunged?
3. what does the fetch return for the expunged messages?


Regards

Richard Bang
Floosietek Ltd
[EMAIL PROTECTED]
http://www.floosietek.com


Reply via email to