[ZODB-Dev] Commit or lock object accross transactions

Christian Reis kiko at async.com.br
Mon Jul 28 17:34:17 EDT 2003


On Mon, Jul 28, 2003 at 02:52:53PM -0400, Shane Hathaway wrote:
> >Just some feedback. We implemented and object id service using
> >BTrees.Length and I'm sorry to say that it doesn't scale very well. It's
> >ok when you have 2 threads but anything above that and you can be sure
> >that you will get duplicate ids.
> >
> >In a test with 10 concurrent clients each continually asking for ids
> >until they have a 100 ids we got 37 duplicates out of a 1000. You might
> >just as well start up your Zope server single threaded :-(
> >
> >Any other ideas?
> 
> Well, seriously, calling self._p_jar.new_oid() ought to work pretty 
> well.  You'll only exhaust the OID space if you make 1 billion IDs per 
> second consistently for the next 500 years. ;-)

The only drawback being that they are global across the whole database,
and don't look very pretty :-)

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL



More information about the ZODB-Dev mailing list