[ZODB-Dev] Re: OID length

Florent Guillaume fg at nuxeo.com
Sat Dec 10 13:52:41 EST 2005


Tim Peters wrote:
> I changed it just now on the trunk, to:
> 
>     _p_oid = Attribute(
>         """The object id.
> 
>         It is up to the data manager to assign this.
>         The special value None is reserved to indicate that an object
>         id has not been assigned.  Non-None object ids must be non-empty
>         strings.  The 8-byte string '\0'*8 (8 NUL bytes) is reserved to
>         identify the database root object.
>         """)

Ok then I guess this comment in Connection doesn't apply anymore:

# It sucks that we have to hold the lock to read _invalidated.
# Normally, _invalidated is written by calling 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.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the ZODB-Dev mailing list