[Neo-report] r1832 vincent - /trunk/neo/client/app.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 23 13:30:59 CET 2010
Author: vincent
Date: Tue Feb 23 13:30:57 2010
New Revision: 1832
Log:
Fix undo error detection code.
Undo fails if any of the following is true:
- cell_list is empty (should never happen, add an assertion for this)
- all connections get a ConnectionClosed exception
- transaction cannot be found in any storage
- an unexpected answer was received (it did not change txn_info)
This fixes the first case, as the test might have received old values from
former executions (which could be neither -1 nor 0) in the same
transaction.
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 Feb 23 13:30:57 2010
@@ -765,6 +765,8 @@
# First get transaction information from a storage node.
cell_list = self._getCellListForTID(transaction_id, readable=True)
+ assert len(cell_list), 'No cell found for transaction %s' % (
+ dump(tid), )
shuffle(cell_list)
for cell in cell_list:
conn = self.cp.getConnForCell(cell)
@@ -787,8 +789,7 @@
break
else:
raise NEOStorageError('undo failed')
-
- if self.local_var.txn_info in (-1, 0):
+ else:
raise NEOStorageError('undo failed')
oid_list = self.local_var.txn_info['oids']
More information about the Neo-report
mailing list