Comment 9 for bug 98275

Revision history for this message
Christian Theune (ctheune) wrote : Re: [Bug 98275] Re: ZEO versus creative __getstate__

Am Donnerstag, den 11.10.2007, 13:58 +0000 schrieb Jim Fulton:
> > The other place I can think of to do this would be serialize.py
> > where it
> > sets the oid and connection (around line 325 on the trunk).
>
> Right. As an aside, the ZODB implementation is overly complex
> (overly abstract) IMO. The code in serialize should be moved back
> to Connection where it belongs. Not now of course. :)

I tried doing that but stumbled over the fact that Python code can't
change _p_state. :/

I went back to cPersistence.c and played around a bit to try seeing
whether I find a place to stick it in there, but I didn't. (I tried
updating the state when the oid or the jar is set. It didn't work and I
don't think it's the right place anyway.)

I have two ideas how to go on:

a) allow Python code to set an object to CHANGED without triggering the
registration with the transaction

b) make the data manager that the object gets registered with more
robust to avoid duplicate registration. This seems simple when looking
at it, but while thinking about it it's not. Objects don't have to be
known to the data manager because they might be discovered while storing
another object implicitly (which is what happens in this case anyway).

Other suggestions?

Christian

--
gocept gmbh & co. kg - forsterstrasse 29 - 06112 halle/saale - germany
www.gocept.com - <email address hidden> - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development