[Zodb-checkins] CVS: ZODB3/ZODB - Connection.py:1.100.2.2

Jeremy Hylton cvs-admin at zope.org
Wed Nov 19 16:54:12 EST 2003


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	Connection.py 
Log Message:
Repair assertion that is double-checking loadNonCurrent()
implementation.


=== ZODB3/ZODB/Connection.py 1.100.2.1 => 1.100.2.2 ===
--- ZODB3/ZODB/Connection.py:1.100.2.1	Tue Oct  7 01:10:32 2003
+++ ZODB3/ZODB/Connection.py	Wed Nov 19 16:54:08 2003
@@ -634,13 +634,17 @@
         Return True if state was available, False if not.
         """
         try:
+            # Load data that was current before the commit at txn_time.
             t = self._storage.loadNonCurrent(obj._p_oid, self._txn_time)
         except KeyError:
             return False
         if t is None:
             return False
         data, serial, start, end = t
-        assert start < end == self._txn_time, (start, end, self._txn_time)
+        # The non-current transaction must have been written before
+        # txn_time.  It must be current at txn_time, but could have
+        # been modified at txn_time.
+        assert start < self._txn_time <= end
         self._noncurrent[obj._p_oid] = True
         self._set_ghost_state(obj, data, serial)
 




More information about the Zodb-checkins mailing list