Commit 3208540f authored by Vincent Pelletier's avatar Vincent Pelletier

Remove txn_finished.

The only alternative to this is raising (either because there was no
answer, or because the answer didn't satisfy our handler).

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2517 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent d03ff8db
......@@ -108,7 +108,6 @@ class ThreadContext(object):
'resolved_conflict_serial_dict': {},
'object_stored': 0,
'txn_voted': False,
'txn_finished': False,
'queue': queue,
'txn_info': 0,
'history': None,
......@@ -879,9 +878,6 @@ class Application(object):
p = Packets.AskFinishTransaction(tid, oid_list)
self._askPrimary(p)
if not self.isTransactionFinished():
raise NEOStorageError('tpc_finish failed')
# Update cache
self._cache_lock_acquire()
try:
......@@ -1237,12 +1233,6 @@ class Application(object):
def getTID(self):
return self.local_var.tid
def setTransactionFinished(self):
self.local_var.txn_finished = True
def isTransactionFinished(self):
return self.local_var.txn_finished
def setTransactionVoted(self):
self.local_var.txn_voted = True
......
......@@ -169,7 +169,6 @@ class PrimaryAnswersHandler(AnswerBaseHandler):
def answerTransactionFinished(self, conn, tid):
if tid != self.app.getTID():
raise ProtocolError('Wrong TID, transaction not started')
self.app.setTransactionFinished()
def answerPack(self, conn, status):
if not status:
......
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