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

Jeremy Hylton jeremy@zope.com
09 Apr 2003 10:56:23 -0400


On Wed, 2003-04-09 at 09:47, Shane Hathaway wrote:
> 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. ;-)

I'd be happy to relax the restriction and allow tuples.  They seem like
reasonable oids.

Jeremy