[PATCH] Set lock pointer at the start of foreach (Re: 2.3.12 transaction problem within skiplist DB->foreach())

Bron Gondwana brong at fastmail.fm
Tue Sep 2 23:25:23 EDT 2008


On Tue, 02 Sep 2008 16:26:19 +0200, "Rudy Gevaert" <Rudy.Gevaert at UGent.be> said:
> Bron Gondwana wrote:
> > On Fri, 29 Aug 2008 09:36:40 -0400, "Wesley Craig" <wes at umich.edu> said:
> >> On 29 Aug 2008, at 02:31, Bron Gondwana wrote:
> >>> Please find attached a tested patch that fixes the problem and  
> >>> refactors
> >>> the bloody mess that was locking code into a couple of nice, neat
> >>> functions.
> >> A quick rewiew looks good to me.  I'll review it closely this  
> >> afternoon and deploy it on a test cluster.  Presuming I find no  
> >> issues I'll commit it thereafter.  Any chance of submitting it to  
> >> bugzilla?
> > 
> > Sure.  Have done.  Bug 3075.
> > 
> > Bron.
> 
> 
> I just hit the a similar problem (see the thread skiplist errors on 
> Cyrus 2.3.12).
> 
> Bron, I applied your patch on my test system and the problem doesn't 
> happen to me any more.
> 
> I was facing the UNLOCKED too when a I deleted a top level mailbox of a 
> user.

Thanks Rudy :)

Just wait until I add nested transactions on top of this!  In particular
it will be nice for that issue someone had a while back of startup taking
FOREVER on an external filesystem with slow locking.  We could easily
take a write lock on the database in a wrapper transaction while we
check through the mailboxes.db if we don't have to worry about passing
that transaction down all the layers when we clean up the partially
created mailboxes.

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Cyrus-devel mailing list