[Zope-Coders] Fw: [Zope] sessions and zope2.6.0

Matthew T. Kromer matt@zope.com
Tue, 22 Oct 2002 10:18:23 -0400


Chris McDonough wrote:

>We're having some problems with BTrees and I'm wondering what the
>best way is to isolate them.
>
>[...]
>"data" points to a IOBTree (its values are OOBTrees).  Line 5
>obtains the keys from the lowest to the max key defined by
>"delete_end".  There is already a bit of code in there to detect a
>broken BTrees range search (lines 6-11), but this isn't really
>relevant.  Line 12 attempts to get the value of one of the keys
>obtained in line 5.  In some cases, it fails with a key error, which
>it should never do (as all it is doing is obtaining the value of a
>key which is returned from keys).
>
>This is with Zope 2.6, and the guy who is having the problem has
>reportedly recompiled Zope binaries via "python wo_pcgi".  The error
>report is below, FWIW.
>
>Ideas about how to isolate the problem are welcome.
>


BTrees have no concurrency protection.  You have nothing protecting you 
from when you do the keys() to when you probe for a value.  Another 
thread could have easily removed the value already.


-- 
Matt Kromer
Zope Corporation  http://www.zope.com/