Deleting top-level mailbox with 'delete_mode: delayed'
brong at fastmail.fm
Tue Nov 13 07:19:01 EST 2007
On Tue, Nov 13, 2007 at 01:11:49PM +0100, Simon Matter wrote:
> > expunge_mode: delayed
> > delete_mode: delayed
> I've just tried a batch delete of mailboxes and hit the same wall.
> Mailbox deletion doesn't work anymore with 2.3.10 if "delete_mode:
> delayed". If "delete_mode: immediate" it works, but with delayed I get
> "deletemailbox: Operation is not supported on mailbox".
> Did I miss something? Does anybody have a patch?
I have "delete_mode: immediate" on the replica and
"delete_mode: delayed" on the master. It doesn't make any sense
for the replica to do a delayed delete, as the master is already
generating a "RENAME" event (well, two MAILBOX events actually,
let's not get picky) with the old and new names for the mailboxes.
The replica will be doing a rename rather than a delete in the
most frequent case anyway. If you're unlucky and the two
MAILBOXES calls get split up (probably some other event on the
first mailbox from earlier being run after you've done the
rename - don't you love concurrency) then it will issue a
DELETE on the replica. If that causes a rename instead you
will wind up with _TWO_ deleted folders with very similar
names, one containing all the messages that were still on
the replica and one containing all the messages in the
copy on the master.
Better just to re-copy those ones from the master in the
unlucky case if you ask me.
More information about the Info-cyrus