[ZODB-Dev] BTrees BHavior

Patrick Phalen pphalen@teleo.net
Sat, 17 Mar 2001 14:02:58 -0800


Jim Fulton lifts the hood for a peek at the Spring 2001 BTrees ...


On Saturday 17 March 2001 13:20, Jim Fulton wrote:

> You should check out the new BTrees (Zope2/lib/python/BTrees)
> while your at it. These are much improved. Among other things:
>
>   - Incorporate sets, including multi-record sets (TreeSets).
>
>   - Generate much fewer database writes, because internal
>     nodes don't keep track of sub-node sizes. Of course, lengths
>     are now expensive, which is why there's now a separate Length
>     class for keeping track of lengths.
>
>   - Lengths, BTrees (actually buckets) and sets now support
>     application-level conflict resolution, which allows conflicts
>     caught at commit time to be resolved in many cases without
>     raising conflict errors.
>
> BTW, ZODB now supports application-level conflict resolution.
> To get the advantage of it, the storage must have extra suppport, which
> is pretty easy to provide. See the changes to FileStorage. Unfortunately,
> conflicts can only be resolved at commit time.  Conflicts detected
> during execution (read) still generate conflict errors.  We hope
> to address this soon.
>
> Jim