Commit 69d830c9 authored by Jim Fulton's avatar Jim Fulton

Bug fixed:

  Certain ZEO server errors could cause a client to get into a state
  where it couldn't commit transactions.
  https://bugs.launchpad.net/zodb/+bug/374737
parent e28661d2
...@@ -41,6 +41,10 @@ Bugs Fixed ...@@ -41,6 +41,10 @@ Bugs Fixed
Changed its sort parameter list to match that of its (Python 2.4+) Changed its sort parameter list to match that of its (Python 2.4+)
UserList base class. UserList base class.
- Certain ZEO server errors could cause a client to get into a state
where it couldn't commit transactions.
https://bugs.launchpad.net/zodb/+bug/374737
3.9.0b5 (2009-08-06) 3.9.0b5 (2009-08-06)
==================== ====================
......
...@@ -407,7 +407,7 @@ class ZEOStorage: ...@@ -407,7 +407,7 @@ class ZEOStorage:
raise StorageTransactionError("Multiple simultaneous tpc_begin" raise StorageTransactionError("Multiple simultaneous tpc_begin"
" requests from one client.") " requests from one client.")
self.transaction = t = transaction.Transaction() t = transaction.Transaction()
t.id = id t.id = id
t.user = user t.user = user
t.description = description t.description = description
...@@ -421,6 +421,16 @@ class ZEOStorage: ...@@ -421,6 +421,16 @@ class ZEOStorage:
self.store_failed = 0 self.store_failed = 0
self.stats.active_txns += 1 self.stats.active_txns += 1
# Assign the transaction attribute last. This is so we don't
# think we've entered TPC until everything is set. Why?
# Because if we have an error after this, the server will
# think it is in TPC and the client will think it isn't. At
# that point, the client will keep trying to enter TPC and
# server won't let it. Errors *after* the tpc_begin call will
# cause the client to abort the transaction.
# (Also see https://bugs.launchpad.net/zodb/+bug/374737.)
self.transaction = t
def tpc_finish(self, id): def tpc_finish(self, id):
if not self._check_tid(id): if not self._check_tid(id):
return return
......
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