in ZEORaid we switched from using `restore` to `store` for replaying
transactions from another storage and found that the data records that
FileStorage returns aren't filling in the `data_txn` fields correctly,
but end up writing `None` all the time.

I'm not exactly sure how to fix this, but attached is a patch that makes
it work for the cases I could come up with.

I'd like to add this change to the trunk (I'll write tests if this
change gets accepted).


Christian Theune · c...@gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
Index: src/ZODB/FileStorage/FileStorage.py
--- src/ZODB/FileStorage/FileStorage.py	(revision 94672)
+++ src/ZODB/FileStorage/FileStorage.py	(working copy)
@@ -1905,6 +1905,9 @@
             prev_txn = None
             if h.plen:
                 data = self._file.read(h.plen)
+                if h.prev:
+                    prev_h = self._read_data_header(h.prev)
+                    prev_txn = prev_h.tid
                 if h.back == 0:
                     # If the backpointer is 0, then this transaction

Attachment: signature.asc
Description: This is a digitally signed message part

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to