[Neo-report] r2594 vincent - /trunk/neo/client/app.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jan 6 15:08:53 CET 2011
Author: vincent
Date: Thu Jan 6 15:08:53 2011
New Revision: 2594
Log:
Do not exit loop if answers are still expected or conflicts known.
This will allow sending requests even when no conflict occur. For example,
it can happen to avoid a deadlock on storage nodes (store again, no conflict
to resolve).
Also, call conflict resolution as soon as a conflict is known, to reduce
tpc_vote duration.
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] Thu Jan 6 15:08:53 2011
@@ -825,15 +825,16 @@ class Application(object):
local_var = self.local_var
tid = local_var.tid
_handleConflicts = self._handleConflicts
- while True:
- self.waitResponses()
- conflicts = _handleConflicts(tryToResolveConflict)
- if conflicts:
- update(conflicts)
- else:
- # No more conflict resolutions to do, no more pending store
- # requests
- break
+ conflict_serial_dict = local_var.conflict_serial_dict
+ queue = local_var.queue
+ pending = self.dispatcher.pending
+ _waitAnyMessage = self._waitAnyMessage
+ while pending(queue) or conflict_serial_dict:
+ _waitAnyMessage()
+ if conflict_serial_dict:
+ conflicts = _handleConflicts(tryToResolveConflict)
+ if conflicts:
+ update(conflicts)
# Check for never-stored objects, and update result for all others
for oid, store_dict in \
More information about the Neo-report
mailing list