Commit 2b07640a authored by Vincent Pelletier's avatar Vincent Pelletier

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.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2594 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 929206c1
...@@ -825,15 +825,16 @@ class Application(object): ...@@ -825,15 +825,16 @@ class Application(object):
local_var = self.local_var local_var = self.local_var
tid = local_var.tid tid = local_var.tid
_handleConflicts = self._handleConflicts _handleConflicts = self._handleConflicts
while True: conflict_serial_dict = local_var.conflict_serial_dict
self.waitResponses() queue = local_var.queue
conflicts = _handleConflicts(tryToResolveConflict) pending = self.dispatcher.pending
if conflicts: _waitAnyMessage = self._waitAnyMessage
update(conflicts) while pending(queue) or conflict_serial_dict:
else: _waitAnyMessage()
# No more conflict resolutions to do, no more pending store if conflict_serial_dict:
# requests conflicts = _handleConflicts(tryToResolveConflict)
break if conflicts:
update(conflicts)
# Check for never-stored objects, and update result for all others # Check for never-stored objects, and update result for all others
for oid, store_dict in \ for oid, store_dict in \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment