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

Barry Warsaw barry at zope.com
Fri Jun 13 17:46:28 EDT 2003


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

Modified Files:
      Tag: ZODB3-3_1-branch
	BDBFullStorage.py 
Log Message:
_dotxnundo(), _collect_objs(): Back port two fixes from the ZODB 3
trunk.  One which fixes the data put into the currentVersions table
and another which ignores a valid missing key situation.


=== ZODB3/BDBStorage/BDBFullStorage.py 1.44.4.4 => 1.44.4.5 ===
--- ZODB3/BDBStorage/BDBFullStorage.py:1.44.4.4	Mon Jan 27 18:19:01 2003
+++ ZODB3/BDBStorage/BDBFullStorage.py	Fri Jun 13 16:46:27 2003
@@ -1192,7 +1192,7 @@
                 self._prevrevids.put(oid, prevrevid, txn=txn)
                 self._txnoids.put(newserial, oid, txn=txn)
                 if vid <> ZERO:
-                    self._currentVersions.put(oid, vid, txn=txn)
+                    self._currentVersions.put(vid, revid, txn=txn)
             self._oids.put(oid, PRESENT, txn=txn)
             rtnoids[oid] = 1
             # Add this object revision to the autopack table
@@ -1579,8 +1579,12 @@
                     if vid <> ZERO:
                         cv = self._currentVersions.cursor(txn=txn)
                         try:
-                            cv.set_both(vid, revid)
-                            cv.delete()
+                            try:
+                                cv.set_both(vid, revid)
+                            except db.DBNotFoundError:
+                                pass
+                            else:
+                                cv.delete()
                         finally:
                             cv.close()
                     # BAW: maybe we want to refcount vids and versions table




More information about the Zodb-checkins mailing list