[Zodb-checkins] SVN: ZODB/branches/3.4/src/ZEO/ More on collector 1847 (ZEO cache tracing).

Tim Peters tim.one at comcast.net
Mon Aug 8 15:28:14 EDT 2005


Log message for revision 37790:
  More on collector 1847 (ZEO cache tracing).
  
  simul.py hit NameErrors when startup cache verification
  found data in the cache to invalidate.
  
  The cache's loadBefore() implementation called _trace()
  incorrectly, passing the tid where the version argument
  belonged.
  

Changed:
  U   ZODB/branches/3.4/src/ZEO/cache.py
  U   ZODB/branches/3.4/src/ZEO/simul.py

-=-
Modified: ZODB/branches/3.4/src/ZEO/cache.py
===================================================================
--- ZODB/branches/3.4/src/ZEO/cache.py	2005-08-08 16:34:29 UTC (rev 37789)
+++ ZODB/branches/3.4/src/ZEO/cache.py	2005-08-08 19:28:14 UTC (rev 37790)
@@ -203,7 +203,7 @@
     def loadBefore(self, oid, tid):
         L = self.noncurrent.get(oid)
         if L is None:
-            self._trace(0x24, oid, tid)
+            self._trace(0x24, oid, "", tid)
             return None
         # A pair with None as the second element is less than any pair with
         # the same first tid.  Dubious:  this relies on that None is less
@@ -214,15 +214,15 @@
         # Therefore the largest start_tid < tid must be at L[i-1].  If i is 0,
         # there is no start_tid < tid:  we don't have any data old enougn.
         if i == 0:
-            self._trace(0x24, oid, tid)
+            self._trace(0x24, oid, "", tid)
             return
         lo, hi = L[i-1]
         assert lo < tid
         if tid > hi:    # we don't have any data in the right range
-            self._trace(0x24, oid, tid)
+            self._trace(0x24, oid, "", tid)
             return None
         o = self.fc.access((oid, lo))
-        self._trace(0x26, oid, tid)
+        self._trace(0x26, oid, "", tid)
         return o.data, o.start_tid, o.end_tid
 
     ##

Modified: ZODB/branches/3.4/src/ZEO/simul.py
===================================================================
--- ZODB/branches/3.4/src/ZEO/simul.py	2005-08-08 16:34:29 UTC (rev 37789)
+++ ZODB/branches/3.4/src/ZEO/simul.py	2005-08-08 19:28:14 UTC (rev 37790)
@@ -397,7 +397,7 @@
         if tid == z64:
             # This is part of startup cache verification:  forget everything
             # about this oid.
-            self._remove_noncurrent_revisions(oid, version)
+            self._remove_noncurrent_revisions(oid)
 
         cur_tid = self.current.get(oid)
         if cur_tid is None:
@@ -410,7 +410,7 @@
         del self.current[oid]
         if tid == z64:
             # Startup cache verification:  forget this oid entirely.
-            self._remove(oid, current_tid)
+            self._remove(oid, cur_tid)
             return
 
         # Our current data becomes non-current data.



More information about the Zodb-checkins mailing list