[Neo-report] r2238 gregory - in /trunk/neo: client/ master/handlers/ tests/master/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Aug 27 17:47:18 CEST 2010
Author: gregory
Date: Fri Aug 27 17:47:17 2010
New Revision: 2238
Log:
Don't abort a transaction on the master node.
There is nothing to clean on the master side when a client abort a
transaction.
Modified:
trunk/neo/client/app.py
trunk/neo/master/handlers/client.py
trunk/neo/tests/master/testClientHandler.py
Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Fri Aug 27 17:47:17 2010
@@ -785,14 +785,6 @@ class Application(object):
logging.error('Exception in tpc_abort while notifying ' \
'storage node %r of abortion, ignoring.', conn, exc_info=1)
- # Abort the transaction in the primary master node.
- conn = self._getMasterConnection()
- try:
- conn.notify(p)
- except:
- logging.error('Exception in tpc_abort while notifying master ' \
- 'node %r of abortion, ignoring.', conn, exc_info=1)
-
# Just wait for responses to arrive. If any leads to an exception,
# log it and continue: we *must* eat all answers to not disturb the
# next transaction.
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] Fri Aug 27 17:47:17 2010
@@ -47,10 +47,6 @@ class ClientServiceHandler(MasterHandler
conn.notify(Packets.NotifyNodeInformation(node_list))
conn.answer(Packets.AnswerNodeInformation())
- def abortTransaction(self, conn, tid):
- # nothing to remove.
- pass
-
def askBeginTransaction(self, conn):
"""
A client request a TID, nothing is kept about it until the finish.
Modified: trunk/neo/tests/master/testClientHandler.py
==============================================================================
--- trunk/neo/tests/master/testClientHandler.py [iso-8859-1] (original)
+++ trunk/neo/tests/master/testClientHandler.py [iso-8859-1] Fri Aug 27 17:47:17 2010
@@ -118,24 +118,6 @@ class MasterClientHandlerTests(NeoTestBa
self.assertEquals(len(txn.getOIDList()), 0)
self.assertEquals(len(txn.getUUIDList()), 1)
-
- def test_11_abortTransaction(self):
- service = self.service
- # give a bad tid, must not failed, just ignored it
- client_uuid = self.identifyToMasterNode(node_type=NodeTypes.CLIENT, port=self.client_port)
- conn = self.getFakeConnection(client_uuid, self.client_address)
- self.assertFalse(self.app.tm.hasPending())
- service.abortTransaction(conn, None)
- self.assertFalse(self.app.tm.hasPending())
- # give a known tid
- conn = self.getFakeConnection(client_uuid, self.client_address)
- tid = self.app.tm.getLastTID()
- self.app.tm.remove(tid)
- self.app.tm.begin(Mock({'__hash__': 1}), tid)
- self.assertTrue(self.app.tm.hasPending())
- service.abortTransaction(conn, tid)
- self.assertFalse(self.app.tm.hasPending())
-
def test_askNodeInformations(self):
# check that only informations about master and storages nodes are
# send to a client
More information about the Neo-report
mailing list