[ZODB-Dev] BTree set question
Dieter Maurer
dieter at handshake.de
Sat Feb 28 05:18:44 EST 2004
Tim Peters wrote at 2004-2-27 00:34 -0500:
> ...
>> I wouldn't want to further punish him by asking him to change it. ;-)
>
>I don't mind changing it if there's a real reason. But that code *is*
>delicate, and at the core of so much of what Zope does, so I don't take any
>changes to it lightly.
I think, you should not change this rule (keep the resolution rule set
stable!).
The current rule performs well for many situations.
It does not for some situations, e.g. counting.
But for counting, a much better data structure is available
than integers: "BTrees.Length".
A much better approach than continuously changing the rule set would
be:
* document the used resolution rules -- you did already in
a great message sent to this list
* allow for customization of the resolution rules in derived
classes.
This might get feasible with ZODB 3.3, as "ExtensionClass"
then will behave much more like normal (new style) classes
such that "_p_resolveConflict" might be overridable in derived
classes.
Of course, this would also require documentation of the
pickle state of BTree and Bucket nodes.
>> I'm also happy to work around the current set of issues (now that I
>> know them!) because I think it likely helps Zope performance in highly
>> concurrent situations.
+1
--
Dieter
More information about the ZODB-Dev
mailing list