[Zodb-checkins] CVS: Zope3/src/ZODB - Connection.py:1.137

Jeremy Hylton jeremy at zope.com
Fri Mar 12 01:15:07 EST 2004


Update of /cvs-repository/Zope3/src/ZODB
In directory cvs.zope.org:/tmp/cvs-serv28452

Modified Files:
	Connection.py 
Log Message:
Remove _noncurrent instance variable.

It's clear in hindsight that the connection only loads non-current
revisions for objects that have been invalidated.  Thus, we never need
to track them to invalidate stale objects; they'll be invalidated
anyway.  And loadBefore() will never return a current revision,
because it would only be called if the current revision could not be
used. 


=== Zope3/src/ZODB/Connection.py 1.136 => 1.137 ===
--- Zope3/src/ZODB/Connection.py:1.136	Thu Mar  4 17:41:50 2004
+++ Zope3/src/ZODB/Connection.py	Fri Mar 12 01:11:36 2004
@@ -178,7 +178,6 @@
         self._invalidated = d = {}
         self._invalid = d.has_key
         self._conflicts = {}
-        self._noncurrent = {}
 
         # If MVCC is enabled, then _mvcc is True and _txn_time stores
         # the upper bound on transactions visible to this connection.
@@ -637,11 +636,8 @@
     def _flush_invalidations(self):
         self._inv_lock.acquire()
         try:
-            for oid in self._noncurrent:
-                assert oid in self._invalidated
             self._cache.invalidate(self._invalidated)
             self._invalidated.clear()
-            self._noncurrent.clear()
             self._txn_time = None
         finally:
             self._inv_lock.release()
@@ -774,15 +770,10 @@
         # txn_time.  It must be current at txn_time, but could have
         # been modified at txn_time.
 
-        # It's possible that end is None.  The _txn_time is set by an
-        # invalidation for one specific object, but it used for the
-        # load time for all objects.  If an object hasn't been
-        # modified since _txn_time, it's end tid will be None.
         assert start < self._txn_time, (u64(start), u64(self._txn_time))
         assert end is None or self._txn_time <= end, \
                (u64(self._txn_time), u64(end))
-        if end is not None:
-            self._noncurrent[obj._p_oid] = True
+        assert end is not None
         self._reader.setGhostState(obj, data)
         obj._p_serial = start
         return True




More information about the Zodb-checkins mailing list