[Zodb-checkins] CVS: StandaloneZODB/ZEO - StorageServer.py:1.32.6.3.2.3

Jeremy Hylton jeremy@zope.com
Mon, 6 May 2002 14:17:23 -0400


Update of /cvs-repository/StandaloneZODB/ZEO
In directory cvs.zope.org:/tmp/cvs-serv4691

Modified Files:
      Tag: ZEO2-branch
	StorageServer.py 
Log Message:
Catch errors when attempting to restart a blocked client.
Log a message when a client blocks waiting for the commit lock.


=== StandaloneZODB/ZEO/StorageServer.py 1.32.6.3.2.2 => 1.32.6.3.2.3 ===
         d = Delay()
         self.__storage._waiting.append((d, self))
+        self._log("Transaction block waiting for storage. "
+                  "%d clients waiting." % len(self.__storage._waiting))
         return d
 
     def _handle_waiting(self):
         if self.__storage._waiting:
             delay, zeo_storage = self.__storage._waiting.pop(0)
-            self.restart(delay)
-            zeo_storage.restart(delay)
+            try:
+                zeo_storage.restart(delay)
+            except:
+                self._log("Unexpected error handling waiting transaction",
+                          level=zLOG.WARNING, error=sys.exc_info())
+                zeo_storage.close()
 
     def restart(self, delay):
         old_strategy = self.strategy