[Zope-Checkins] CVS: ZODB3/ZODB/FileStorage -
FileStorage.py:1.1.2.11
Jeremy Hylton
cvs-admin at zope.org
Tue Nov 18 12:08:50 EST 2003
Update of /cvs-repository/ZODB3/ZODB/FileStorage
In directory cvs.zope.org:/tmp/cvs-serv3650/ZODB/FileStorage
Modified Files:
Tag: ZODB3-mvcc-2-branch
FileStorage.py
Log Message:
Fix details of loadEx() for versions and backpointers.
Add comments that explain the rationale.
=== ZODB3/ZODB/FileStorage/FileStorage.py 1.1.2.10 => 1.1.2.11 ===
--- ZODB3/ZODB/FileStorage/FileStorage.py:1.1.2.10 Wed Nov 12 15:30:32 2003
+++ ZODB3/ZODB/FileStorage/FileStorage.py Tue Nov 18 12:08:49 2003
@@ -542,15 +542,17 @@
pos = self._lookup_pos(oid)
h = self._read_data_header(pos, oid)
if h.version and h.version != version:
- data, serial, _, tloc = self._loadBack_impl(oid, h.pnv)
- th = self._read_txn_header(tloc)
- return data, serial, th.tid
+ # Skip this txn's record entirely. Return data, serial, tid
+ # from non-version data.
+ return self._loadBackTxn(oid, h.pnv)
if h.plen:
data = self._file.read(h.plen)
th = self._read_txn_header(h.tloc)
return data, h.serial, th.tid
else:
- data, _, _, tloc = self._loadBack_impl(oid, h.back)
+ # 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
finally:
More information about the Zope-Checkins
mailing list