Commit 12cc4e41 authored by Jeremy Hylton's avatar Jeremy Hylton

Revise log messages for blocked transactions.

Log message less choppy.

There was an info-level log call when a transaction was blocked, but
not a complementary one when the transaction was resumed.  Added the
latter, so that the log provides a clear record of whether the server
is wedged or working.
parent 3378c28d
......@@ -352,7 +352,7 @@ class ZEOStorage:
if self.__storage._transaction:
d = Delay()
self.__storage._waiting.append((d, self))
self._log("Transaction block waiting for storage. "
self._log("Transaction blocked waiting for storage. "
"%d clients waiting." % len(self.__storage._waiting))
return d
else:
......@@ -363,6 +363,12 @@ class ZEOStorage:
delay, zeo_storage = self.__storage._waiting.pop(0)
if self._restart(zeo_storage, delay):
break
if self.__storage._waiting:
n = len(self.__storage._waiting)
self._log("Blocked transaction restarted. "
"%d clients waiting." % n)
else:
self._log("Blocked transaction restarted.")
def _restart(self, zeo_storage, delay):
# call the restart() method on the appropriate server
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment