[ZODB-Dev] How to avoid ConflictErrors in BTrees ?

Tarek Ziadé ziade.tarek at gmail.com
Fri Feb 1 06:03:53 EST 2008


Hello,

I have a simple use case in a Zope site:

We had to manage massive object creation, so we set up Btrees. 
Users are creating a lot of objects in a single Btree. They are never
working on the same object, just adding new objects. This leads to conflict
errors when the pace of creation is high. It happens for instance in a
website where 200 users work all day long on the website, and are creating
objects in the btree.

I have created a Python script to try to reproduce this problem with ZODB
3.7. Basically, it tries to reproduce the adding of objects by users, with
sleeps to reproduce a realistic transaction when these objects are added
through a Zope app.

It's here: http://paste.plone.org/19308

The stress values I have set are generating Conflict errors on my MacBook.

I have then tried the very same script, using RelStorage, because I thaught
it would be better,
but I have the same non resolved conflicts.

Since BTrees are written in C, I couldn't add my own conflict manager to try
to merge buckets. (and this is
way over my head)

Is there a way to avoid these conflicts in BTree ?

++
Tarek

-- 
View this message in context: http://www.nabble.com/How-to-avoid-ConflictErrors-in-BTrees---tp15224628p15224628.html
Sent from the Zope - ZODB-Dev mailing list archive at Nabble.com.



More information about the ZODB-Dev mailing list