maybe I didn't fully understand the code, but I think I found a possible
race-condition in new code between what zope 2.9 and zope 2.10 uses.
In get(), a _pre_cache was added to avoid some infinite loop. Now, when
two threads want to get the same oid, I think it's possible that at
least one ends up with a unfinished object:
1 oid is in no cache, so self._storage.load()
1 self._pre_cache[oid] = obj
2 oid is not in cache _cache, _added, but in _pre_cache.
2 gets the obj from _pre_cache before thread 1 inited it.
2 uses object, which isn't initialized with _p_jar and so on.
Maybe I didn't see the code that prevents this. Any opinions?
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org