[Zodb-checkins] CVS: Packages/ZEO - ClientStorage.py:1.106.4.10 __init__.py:1.19.4.16 version.txt:1.9.4.15

Tim Peters tim.one at comcast.net
Fri Jan 7 15:28:13 EST 2005


Update of /cvs-repository/Packages/ZEO
In directory cvs.zope.org:/tmp/cvs-serv12372/ZEO

Modified Files:
      Tag: Zope-2_7-branch
	ClientStorage.py __init__.py version.txt 
Log Message:
Collector 1503:  excessive logging.

ClientStorage._wait_sync():  Don't log more than one "waiting for cache
verification to finish" message per 5 minutes.

Also changes to make this appear to be the 3.2.5c1 release. 


=== Packages/ZEO/ClientStorage.py 1.106.4.9 => 1.106.4.10 ===
--- Packages/ZEO/ClientStorage.py:1.106.4.9	Fri Oct 24 11:37:49 2003
+++ Packages/ZEO/ClientStorage.py	Fri Jan  7 15:27:42 2005
@@ -343,21 +343,29 @@
             self._wait_sync(deadline)
 
     def _wait_sync(self, deadline=None):
-        # If there is no mainloop running, this code needs
-        # to call poll() to cause asyncore to handle events.
-        while 1:
-            if self._ready.isSet():
-                break
-            if deadline and time.time() > deadline:
+        # Log no more than one "waiting" message per LOG_THROTTLE seconds.
+        LOG_THROTTLE = 300 # 5 minutes
+        next_log_time = time.time()
+
+        while not self._ready.isSet():
+            now = time.time()
+            if deadline and now > deadline:
                 log2(PROBLEM, "Timed out waiting for connection")
                 break
-            log2(INFO, "Waiting for cache verification to finish")
+            if now >= next_log_time:
+                log2(INFO, "Waiting for cache verification to finish")
+                next_log_time = now + LOG_THROTTLE
             if self._connection is None:
                 # If the connection was closed while we were
                 # waiting for it to become ready, start over.
-                return self._wait(deadline - time.time())
-            else:
-                self._connection.pending(30)
+                if deadline is None:
+                    timeout = None
+                else:
+                    timeout = deadline - now
+                return self._wait(timeout)
+            # No mainloop ia running, so we need to call something fancy to
+            # handle asyncore events.
+            self._connection.pending(30)
 
     def close(self):
         """Storage API: finalize the storage, releasing external resources."""


=== Packages/ZEO/__init__.py 1.19.4.15 => 1.19.4.16 ===
--- Packages/ZEO/__init__.py:1.19.4.15	Mon Dec 13 13:18:09 2004
+++ Packages/ZEO/__init__.py	Fri Jan  7 15:27:42 2005
@@ -21,4 +21,4 @@
 
 """
 
-version = "2.2.5b1"
+version = "2.2.5c1"


=== Packages/ZEO/version.txt 1.9.4.14 => 1.9.4.15 ===
--- Packages/ZEO/version.txt:1.9.4.14	Mon Dec 13 13:18:09 2004
+++ Packages/ZEO/version.txt	Fri Jan  7 15:27:42 2005
@@ -1 +1 @@
-2.2.5b1
+2.2.5c1



More information about the Zodb-checkins mailing list