[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.73.2.10
Barry Warsaw
barry@wooz.org
Mon, 20 Jan 2003 16:02:20 -0500
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv22477
Modified Files:
Tag: ZODB3-3_1-branch
ClientStorage.py
Log Message:
tpc_abort(): Backported from the 3.2 trunk, this ignores any
ClientDisconnected exception that could be raised during the call to
the server's tpc_abort when we're not connected.
=== ZODB3/ZEO/ClientStorage.py 1.73.2.9 => 1.73.2.10 ===
--- ZODB3/ZEO/ClientStorage.py:1.73.2.9 Thu Dec 26 15:22:53 2002
+++ ZODB3/ZEO/ClientStorage.py Mon Jan 20 16:02:17 2003
@@ -656,11 +656,18 @@
if transaction is not self._transaction:
return
try:
- self._server.tpc_abort(self._serial)
+ # XXX Are there any transactions that should prevent an
+ # abort from occurring? It seems wrong to swallow them
+ # all, yet you want to be sure that other abort logic is
+ # executed regardless.
+ try:
+ self._server.tpc_abort(self._serial)
+ except ClientDisconnected:
+ log2(BLATHER, 'ClientDisconnected in tpc_abort() ignored')
+ finally:
self._tbuf.clear()
self._seriald.clear()
del self._serials[:]
- finally:
self.end_transaction()
def tpc_finish(self, transaction, f=None):