[Zodb-checkins] CVS: ZODB3/ZODB/FileStorage - FileStorage.py:1.1.2.13

Jeremy Hylton cvs-admin at zope.org
Thu Nov 20 16:01:42 EST 2003


Update of /cvs-repository/ZODB3/ZODB/FileStorage
In directory cvs.zope.org:/tmp/cvs-serv12351/ZODB/FileStorage

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	FileStorage.py 
Log Message:
Change loadEx() to return the version the data is from as 4th value.

If you request version X, but version X doesn't exist, you get the
non-version data.  ZEO can manage its cache more effectively if it
knows whether the data it gets back is actually from a version or its
just non-version data.

Also fix one test the a previous checkin broke.  You always get the
current txn id, even when you get old data and serial no via
backpointer.


=== ZODB3/ZODB/FileStorage/FileStorage.py 1.1.2.12 => 1.1.2.13 ===
--- ZODB3/ZODB/FileStorage/FileStorage.py:1.1.2.12	Thu Nov 20 12:26:50 2003
+++ ZODB3/ZODB/FileStorage/FileStorage.py	Thu Nov 20 16:01:10 2003
@@ -550,17 +550,17 @@
                 # than any non-current data.
                 data, serial, _, _ = self._loadBack_impl(oid, h.pnv)
                 th = self._read_txn_header(h.tloc)
-                return data, serial, th.tid
+                return data, serial, th.tid, ""
             if h.plen:
                 data = self._file.read(h.plen)
                 th = self._read_txn_header(h.tloc)
-                return data, h.serial, th.tid
+                return data, h.serial, th.tid, h.version
             else:
                 # Get the data from the backpointer, but tid and serial
                 # from currnt txn.
                 data, _, _, _ = self._loadBack_impl(oid, h.back)
                 th = self._read_txn_header(h.tloc)
-                return data, h.serial, th.tid
+                return data, h.serial, th.tid, h.version
         finally:
             self._lock_release()
 




More information about the Zodb-checkins mailing list