Commit fddb6f85 authored by Jim Fulton's avatar Jim Fulton

Fix a race

Where we check for a disconnect, get disconnected and vote
parent da2e2281
......@@ -723,7 +723,13 @@ class ClientStorage(object):
"""Storage API: vote on a transaction.
"""
tbuf = self._check_trans(txn, 'tpc_vote')
try:
self._call('vote', id(txn))
except POSException.StorageTransactionError:
# Hm, we got disconnected and reconnected bwtween
# _check_trans and voting. Let's chack the transaction again:
tbuf = self._check_trans(txn, 'tpc_vote')
raise
if tbuf.exception:
raise tbuf.exception
......
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