[ZODB-Dev] Re: BTrees strangeness (was [Zope-dev] Zope 2.X
BIGSession problems - blocker - our site dies - need help of
experienceZope developer, please)
Tim Peters
tim at zope.com
Wed Mar 3 17:14:21 EST 2004
[Chris McDonough]
> ...
> The _data BTree is of course written to elsewhere in the code
>
(http://cvs.zope.org/*checkout*/Products/Transience/Transience.py?rev=1.32.1
2.2.2.2&content-type=text/plain)
That code is scary to me -- it talks about threads in the comments, but
there's nary a mutex in sight. If, for example, two threads happen to run
_gc() simulateously, what's to stop one from deleting the same keys the
other is crawling over? Since it must be rare for two threads to get into
_gc at the same time (but I don't see anything-- like a mutex --that
guarantees to stop that), this theory may also fit the "rare and
hard-to-reproduce failure" symptom. It may in fact be safe against thread
races, but if it is I don't see how.
More information about the ZODB-Dev
mailing list