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):
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 \
......
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