[ZODB-Dev] Re: [Zope-Checkins] CVS: ZODB3/ZODB - Connection.py:1.88 DB.py:1.48 cPickleCache.c:1.81

Shane Hathaway shane@zope.com
Wed, 09 Apr 2003 09:47:23 -0400


Toby Dickenson wrote:
> On Tuesday 08 April 2003 4:56 pm, Jeremy Hylton wrote:
> 
> 
>>+        # XXX It sucks that we have to hold the lock to read
>>+        # _invalidated.  Normally, _invalidated is written by call
>>+        # dict.update, which will execute atomically by virtue of the
>>+        # GIL.  But some storage might generate oids where hash or
>>+        # compare invokes Python code.  In that case, the GIL can't
>>+        # save us.
> 
> 
> Other parts of ZODB already assume that oids are plain strings. I think we 
> discussed this for AdaptableStorage. Does that simplify things?

Actually, cPickleCache enforces all OIDs to be strings.  This was 
annoying at first, but the strings can be of arbitrary length, so it's 
not too bad.  Ape uses marshalled tuples as OIDs, which seems to be safe 
so far. ;-)

Shane