Commit c7cdcf87 authored by Julien Muchembled's avatar Julien Muchembled

client: unindent code

parent 0cc593ae
...@@ -725,23 +725,22 @@ class Application(ThreadedApplication): ...@@ -725,23 +725,22 @@ class Application(ThreadedApplication):
txn_container = self._txn_container txn_container = self._txn_container
if not txn_container.get(transaction).voted: if not txn_container.get(transaction).voted:
self.tpc_vote(transaction) self.tpc_vote(transaction)
if 1: txn_context = txn_container.pop(transaction)
txn_context = txn_container.pop(transaction) cache_dict = txn_context.cache_dict
cache_dict = txn_context.cache_dict checked_list = [oid for oid, data in cache_dict.iteritems()
checked_list = [oid for oid, data in cache_dict.iteritems() if data is CHECKED_SERIAL]
if data is CHECKED_SERIAL] for oid in checked_list:
for oid in checked_list: del cache_dict[oid]
del cache_dict[oid] ttid = txn_context.ttid
ttid = txn_context.ttid p = Packets.AskFinishTransaction(ttid, cache_dict, checked_list)
p = Packets.AskFinishTransaction(ttid, cache_dict, checked_list) try:
try: tid = self._askPrimary(p, cache_dict=cache_dict, callback=f)
tid = self._askPrimary(p, cache_dict=cache_dict, callback=f) assert tid
assert tid except ConnectionClosed:
except ConnectionClosed: tid = self._getFinalTID(ttid)
tid = self._getFinalTID(ttid) if not tid:
if not tid: raise
raise return tid
return tid
def _getFinalTID(self, ttid): def _getFinalTID(self, ttid):
try: try:
......
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