Question about 2.4.x mailbox rename/locking behaviour

Greg Banks gnb at fastmail.fm
Sun Aug 12 22:34:45 EDT 2012



On Fri, Aug 10, 2012, at 06:04 AM, Bill Ryder wrote:
> Hi all,


Hi Bill,

Sorry for the slow reply, I was away Friday.

> We have two problems with cyrus in our environment which is constantly
> used as ammunition against it.
> 
> We are running 2.3.16 right now.
> 
> The problems are
> 
> 1. Can not unreserve a mailbox without restarting cyrus - these can be
> caused by number 2 below
> 2. Mailbox renames - or deletes - can take a LONG time - and delivery
> stops eventually.
> [...]
> Has anything changed in 2.4 that will stop this kind of thing from
> happening?

So I joined the project at the point when 2.3 was already in the past,
but on examining the source I see that both 2.4 and the development
branch that will be 2.5 both have the same behaviour you describe.  Each
individual file in a folder in linked to its new location and unlinked
again from it's old location, while keeping the mailbox lock.  This is a
long way south of optimal for the common case where an entire user is on
the same filesystem, but that code path is designed to handle all the
cases and handle them safely.

> Depending on fileserver load etc it can take 30 minutes to do one of
> these moves (artists often have wacom email folder drag and 
> drop events which can start huge unexpected mailbox renames)

Cyrus' design generally assumes that folder management is something you
do rarely and deliberately, because this is true for the majority of
people.   Perhaps your email client can be convinced to disable folder
renames via dragging?

OTOH, there's no really good reason for renames to be slow in the common
case, and we've fixed worse problems. We have spoken about improving
folder deletes and renames several times, but there's been no real
impetus.  Raise a bug and we can have a discussion there.

> if the mailbox is large I have to kill the imapd doing the move and clean it
> up. This leads to a reserved mailbox that I can't clear without a reboot.

In 2.4 mailbox reserving is no longer used (unless you're running a
Cyrus murder).

-- 
Greg.


More information about the Info-cyrus mailing list