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

Tarek Ziadé ziade.tarek at gmail.com
Fri Feb 1 09:49:19 EST 2008



Jim Fulton wrote:
> 
> ...
>> 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)
> That doesn't really matter, because conflict-resolution can only  
> operate on one object at a time.
> 

Is the class I have shown to Andreas is the way to go for conflict
resolution
(beside the fact that it shouldn't occur with a better design) ?


Jim Fulton wrote:
> 
> ..
> A similar and common mistake is  
> to allocate keys sequentially.  A better solution is to allocate keys  
> randomly (or sequentially within threads with random starting points).
> 

Is it possible to have some kind of thread-safe next_id() function ?
like what some database systems provides

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



More information about the ZODB-Dev mailing list