[Neo-report] r2163 vincent - /trunk/neo/client/app.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jun 15 12:04:29 CEST 2010


Author: vincent
Date: Tue Jun 15 12:04:26 2010
New Revision: 2163

Log:
Use a set of node rather than a set of cells.

This avoids sending multiple abort messages for each storage node (one per
partition it is assigned to).

Modified:
    trunk/neo/client/app.py

Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Tue Jun 15 12:04:26 2010
@@ -768,17 +768,18 @@ class Application(object):
         tid = self.local_var.tid
         getCellListForOID = self._getCellListForOID
         # select nodes where transaction was stored
-        cell_set = set(self._getCellListForTID(tid,
-            writable=True))
+        node_set = set([x.getNode() for x in self._getCellListForTID(tid,
+            writable=True)])
         # select nodes where objects were stored
         for oid in self.local_var.data_dict.iterkeys():
-            cell_set |= set(getCellListForOID(oid, writable=True))
+            node_set |= set([x.getNode() for x in getCellListForOID(oid,
+                writable=True)])
 
         p = Packets.AbortTransaction(tid)
-        getConnForCell = self.cp.getConnForCell
+        getConnForNode = self.cp.getConnForNode
         # cancel transaction one all those nodes
-        for cell in cell_set:
-            conn = getConnForCell(cell)
+        for node in node_set:
+            conn = getConnForNode(node)
             if conn is None:
                 continue
             conn.notify(p)





More information about the Neo-report mailing list