[Neo-report] r2171 gregory - in /trunk/neo/master: handlers/client.py transactions.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jun 17 12:06:08 CEST 2010


Author: gregory
Date: Thu Jun 17 12:05:54 2010
New Revision: 2171

Log:
Move this check to the transaction manager.

Modified:
    trunk/neo/master/handlers/client.py
    trunk/neo/master/transactions.py

Modified: trunk/neo/master/handlers/client.py
==============================================================================
--- trunk/neo/master/handlers/client.py [iso-8859-1] (original)
+++ trunk/neo/master/handlers/client.py [iso-8859-1] Thu Jun 17 12:05:54 2010
@@ -48,10 +48,7 @@ class ClientServiceHandler(MasterHandler
         conn.answer(Packets.AnswerNodeInformation())
 
     def abortTransaction(self, conn, tid):
-        if tid in self.app.tm:
-            self.app.tm.remove(tid)
-        else:
-            logging.warn('aborting transaction %s does not exist', dump(tid))
+        self.app.tm.remove(tid)
 
     def askBeginTransaction(self, conn, tid):
         node = self.app.nm.getByUUID(conn.getUUID())

Modified: trunk/neo/master/transactions.py
==============================================================================
--- trunk/neo/master/transactions.py [iso-8859-1] (original)
+++ trunk/neo/master/transactions.py [iso-8859-1] Thu Jun 17 12:05:54 2010
@@ -233,6 +233,7 @@ class TransactionManager(object):
             Remove a transaction, commited or aborted
         """
         if tid not in self._tid_dict:
+            logging.warn('aborting transaction %s does not exist', dump(tid))
             return
         node = self._tid_dict[tid].getNode()
         # remove both mappings, node will be removed in abortFor





More information about the Neo-report mailing list