[ZODB-Dev] Question about BTree transaction data

Pascal Peregrina Pperegrina at Lastminute.com
Thu Apr 13 06:26:49 EDT 2006


Replied to quickly...

So, if I use HistoryJar to load a BTree from a given old state, are you sure HistoryJar will correctly load all the BTree subobjects (sub BTrees and Buckets)? I got the impression, reading HistoryJar code, that it might load current state of subobjects, not old states... :(

Pascal

-----Message d'origine-----
De : zodb-dev-bounces+pperegrina=lastminute.com at zope.org [mailto:zodb-dev-bounces+pperegrina=lastminute.com at zope.org] De la part de Pascal Peregrina
Envoyé : jeudi 13 avril 2006 11:27
À : Dieter Maurer
Cc : zodb-dev at zope.org
Objet : RE: [ZODB-Dev] Question about BTree transaction data

HistoryJar is what I was looking for !!
Thanks !

Pascal

-----Message d'origine-----
De : Dieter Maurer [mailto:dieter at handshake.de] 
Envoyé : mercredi 12 avril 2006 19:41
À : Pascal Peregrina
Cc : zodb-dev at zope.org
Objet : RE: [ZODB-Dev] Question about BTree transaction data

Pascal Peregrina wrote at 2006-4-12 08:35 +0100:
>I use FileStorage (via ZEO).
>
>I have switched a big dictionary from PersistentMapping to BTree.
>
>In the past, it was easy to compute added/deleted keys from states (cause PersistentMapping state contains the whole dictionary, so it was only a matter of getting the keys and comparing them with previous state keys).

What do you mean by "state"?
What you get with "obj.__getstate__()"?

  In this case, you can indeed not compute added/deleted keys
  alone from the current and a previous state of the tree alone.
  You must also take into account the state of children...

>...
So could you give me a little more details about what you mean? (or of course point me to some example/resources on the net)

Search the mailing list archive (for "zope at zope.org" or
"zope-dev at zope.org") for a post from me about "HistoryJar".

This is a speciallized ZODB connection that loads the state of objects
as it was at a given time.
In this, I do not mean "state" technically as the result of "__getstate__"
but as the complete object state. You can use such a "historical"
object in the same way as you use a "current" object (apart from
not being able to modify it). Especially, you can ask a historical
BTrees.XXBTree instance for
all its keys and compare this to all the keys of the current object.

-- 
Dieter


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev at zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


More information about the ZODB-Dev mailing list