[Zodb-checkins] CVS: ZODB3/ZODB - DemoStorage.py:1.21.2.3 MappingStorage.py:1.9.40.2

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


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	DemoStorage.py MappingStorage.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/DemoStorage.py 1.21.2.2 => 1.21.2.3 ===
--- ZODB3/ZODB/DemoStorage.py:1.21.2.2	Tue Nov 18 14:07:28 2003
+++ ZODB3/ZODB/DemoStorage.py	Thu Nov 20 16:01:10 2003
@@ -198,6 +198,7 @@
                     return self._base.load(oid, '')
                 raise KeyError, oid
 
+            ver = ""
             if vdata:
                 oversion, nv = vdata
                 if oversion != version:
@@ -205,11 +206,12 @@
                         oid, serial, pre, vdata, p, tid = nv
                     else:
                         raise KeyError, oid
+                ver = oversion
 
             if p is None:
                 raise KeyError, oid
 
-            return p, serial, tid
+            return p, serial, tid, ver
         finally: self._lock_release()
 
     def load(self, oid, version):


=== ZODB3/ZODB/MappingStorage.py 1.9.40.1 => 1.9.40.2 ===
--- ZODB3/ZODB/MappingStorage.py:1.9.40.1	Wed Nov  5 23:33:45 2003
+++ ZODB3/ZODB/MappingStorage.py	Thu Nov 20 16:01:10 2003
@@ -64,7 +64,7 @@
             # Since this storage doesn't support versions, tid and
             # serial will always be the same.
             p = self._index[oid]
-            return p[8:], p[:8], p[:8] # pickle, serial, tid
+            return p[8:], p[:8], p[:8], "" # pickle, serial, tid
         finally:
             self._lock_release()
         




More information about the Zodb-checkins mailing list