[Zodb-checkins] CVS: ZODB3/BDBStorage - BDBFullStorage.py:1.75.2.2

Jeremy Hylton cvs-admin at zope.org
Tue Nov 18 14:08:52 EST 2003


Update of /cvs-repository/ZODB3/BDBStorage
In directory cvs.zope.org:/tmp/cvs-serv21750/BDBStorage

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	BDBFullStorage.py 
Log Message:
An attempt at loadEx() for BDBFullStorage.  Not quite right.


=== ZODB3/BDBStorage/BDBFullStorage.py 1.75.2.1 => 1.75.2.2 ===
--- ZODB3/BDBStorage/BDBFullStorage.py:1.75.2.1	Tue Oct  7 01:10:32 2003
+++ ZODB3/BDBStorage/BDBFullStorage.py	Tue Nov 18 14:08:51 2003
@@ -910,7 +910,7 @@
     # Accessor interface
     #
 
-    def load(self, oid, version):
+    def loadEx(self, oid, version):
         self._lock_acquire()
         try:
             # Get the current revision information for the object.  As per the
@@ -927,14 +927,19 @@
             # object is living in is the one that was requested, we simply
             # return the current revision's pickle.
             if vid == ZERO or self._versions.get(vid) == version:
-                return self._pickles[oid+lrevid], serial
+                return self._pickles[oid+lrevid], serial, tid
             # The object was living in a version, but not the one requested.
             # Semantics here are to return the non-version revision.  Allow
             # KeyErrors to percolate up (meaning there's no non-version rev).
             lrevid = self._metadata[oid+nvrevid][16:24]
-            return self._pickles[oid+lrevid], nvrevid
+            # XXX Is nrevid always correct?  That is, will the tid always
+            # match the serialno for non-vrsion data?
+            return self._pickles[oid+lrevid], nvrevid, nvrevid
         finally:
             self._lock_release()
+
+    def load(self, oid, version):
+        return self.loadEx(oid, version)[:2]
 
     def _getSerialAndTidMissingOk(self, oid):
         # For the object, return the curent serial number and transaction id




More information about the Zodb-checkins mailing list