[Cyrus-CVS] src/cyrus/lib by murch

Bron Gondwana brong at fastmail.fm
Tue Nov 27 16:11:08 EST 2007


On Tue, 27 Nov 2007 11:36:02 -0500, "Ken Murchison" <murch at andrew.cmu.edu> said:
> Bron Gondwana wrote:
> > Don't worry, I've got some more patches for you!
> > 
> > cyrus-skiplist-transactions-2.3.10.diff
> > 
> >   It's pretty well documented in the diff header.  Basically, if a
> >   transaction was open on a database and you made a read-only query
> >   without a transaction on it (actually, any other query without
> >   passing the _SAME_ transaction object) it would screw up royally.
> > 
> >   Not to mention that passing a transaction at all after it had been
> >   used in a commit or abort would have made a mess.
> 
> 
> What patches do you run that uncovered these problems?  Are these 
> skiplist-specific problems or are they present in any cyrusdb backend? 
> I'm trying to figure out if we're trying to do something with dbs that 
> the API wasn't designed to handle.

Both fast rename and folder limit call count_inferiors while they are
in the middle of a transaction.  It does a foreach to get the count.

I haven't had a good look at BDB - but I'm hoping its's capable of
having a query done inside a transaction.  I can visualise a skiplist
database that can handle it as well (the difference being that you
wouldn't see changes made in the transaction until it commits unless
you pass the transaction pointer), but this one doesn't.  In a large
part because it uses separate "DELETE" and "ADD" records within a
transaction rather than a "REPLACE" record.

> > cyrus-skiplist-transactionuse-2.3.10.diff
> 
> Applied to CVS.

I'm hoping you got the second one :)  I'll just check.  Basically, the
first one uncovered a second bug where you could call commit with a
NULL tid, which fails an assert.  Doh!

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Cyrus-devel mailing list