[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cyrus-info
Subject:    Cyrus 2.4.X delete mailbox oddities
From:       brong () fastmail ! fm (Bron Gondwana)
Date:       2011-06-28 13:18:57
Message-ID: 1309267137.5601.1468098057 () webmail ! messagingengine ! com
[Download RAW message or body]

On Tue, 28 Jun 2011 15:05 +0200, "Bron Gondwana" <brong at fastmail.fm> wrote:
> On Tue, 28 Jun 2011 14:42 +0200, "Bron Gondwana" <brong at fastmail.fm> wrote:
> > Ok, so that's annoying.  LOGOUT doesn't clean up after itself.
> > That's definitely a bug.  I'll see what I can do about that.
> 
> Ahh, yeah - we don't read the cyrus.index again on shutdown, so we
> don't notice that the flag has been set.  That kind of sucks.  I
> guess the workaround would be to take a readonly trylock during
> mailbox close and re-read the header.  Hmm.  I'll see how much code
> that would take.

Answer: not much

+    /* get a re-read of the options field for cleanup purposes */
+    if (!mailbox->index_locktype)
+       mailbox_lock_index(mailbox, LOCK_SHARED);

That's a non-speculative lock though, so it means the close could
wind up waiting when it didn't strictly need to.  A better solution
would be to have a non-blocking read-only lock type.  But we don't
have one of those.  This will be fine though - usually the lock
will succeed anyway, and this will only occur when we're doing a
an imapd deselect, because pretty much every other case the index
is already locked going in to the close.

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic