[ZODB-Dev] Re: Historical Persistent References -- Feedback Wanted!
Matt Hahnfeld
matth at everysoft.com
Mon Mar 13 14:33:29 EST 2006
On Mon, 13 Mar 2006 19:54:43 +0100, Dieter Maurer wrote:
>>To make a long story short, the current implementation of
>>historicalRevision in Zope's OFS/History.py calls oldstate() in
>>ZODB/Connection.py. The serializer then calls getState() in
>>ZODB/serialize.py (class ObjectReader), which sets up an unpickler to
>>handle persistent references by overriding _persistent_load().
>>Unfortunately, when the _persistent_load subroutine comes across a
>>persistent reference, it either loads the CURRENT referenced object
>>from the ZODB (using the oid and ZODB/Connection.py's get()), or loads the
>>CURRENT referenced object from cache. It does not take 'tid' into account
>>when it loads persistent references.
>
> A long time ago, I posted code (I think to "zope-dev at zope.org")
> that does it for you in the right way.
> It defines a "HistoricalConnection" which retrieves objects
> with a state as of a given time.
> You might search for "historicalRevision" and "HistoryJar"
> to locate the post.
>
>
> Zope 2.8/ZODB 3.4 broke my implementation but it would probably
> not too difficult to get fixed.
Dieter --
I found your code a while back and actually looked it over quit a bit
before I started coding the solution I attached. Would you be able to
explain how it works? A lot of your code made sense, but I was a bit
overwhelmed by some of it.
Here's the link:
http://article.gmane.org/gmane.comp.web.zope.zodb/6327
BTW, if your posted solution is still viable, I'd be more than happy to
help port it to 2.8, or help out in whatever other capacity I can.
More information about the ZODB-Dev
mailing list