Commit 297af16a authored by Vincent Pelletier's avatar Vincent Pelletier

Simplify r1858.

There is no need to make a special case in waitStoreResponses if it becomes
equivalent to just calling waitResponses.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2029 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e18a6d2a
...@@ -647,8 +647,6 @@ class Application(object): ...@@ -647,8 +647,6 @@ class Application(object):
_handleConflicts = self._handleConflicts _handleConflicts = self._handleConflicts
while True: while True:
self.waitResponses() self.waitResponses()
if tryToResolveConflict is None:
break
conflicts = _handleConflicts(tryToResolveConflict) conflicts = _handleConflicts(tryToResolveConflict)
if conflicts: if conflicts:
update(conflicts) update(conflicts)
...@@ -657,16 +655,15 @@ class Application(object): ...@@ -657,16 +655,15 @@ class Application(object):
# requests # requests
break break
if tryToResolveConflict is not None: # 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_count in \
for oid, store_count in \ local_var.object_stored_counter_dict.iteritems():
local_var.object_stored_counter_dict.iteritems(): if store_count == 0:
if store_count == 0: raise NEOStorageError('tpc_store failed')
raise NEOStorageError('tpc_store failed') elif oid in resolved_oid_set:
elif oid in resolved_oid_set: append((oid, ResolvedSerial))
append((oid, ResolvedSerial)) else:
else: append((oid, tid))
append((oid, tid))
return result return result
@profiler_decorator @profiler_decorator
...@@ -720,7 +717,7 @@ class Application(object): ...@@ -720,7 +717,7 @@ class Application(object):
# Just wait for response to arrive, don't handle any conflict, and # Just wait for response to arrive, don't handle any conflict, and
# ignore the outcome: we are going to abort anyway. # ignore the outcome: we are going to abort anyway.
self.waitStoreResponses(None) self.waitResponses()
cell_set = set() cell_set = set()
# select nodes where objects were stored # select nodes where objects were stored
......
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