Yield to other greenthreads during validation
Validating a large stack locks up a whole worker until it is complete, because it doesn't co-operate in greenlet's co-operative multithreading. With this change, we now yield the flow of control between each resource, so that validation can't monopolise the process. Validation is high priority because it happens synchronously, but it is probably worth the trade-off to avoid blocking anything else happening on the same worker. Change-Id: I8514640135a915791a0905eea40ef70876ae1cb1
This commit is contained in:
parent
9c23f782e7
commit
c713cc5d64
@ -864,6 +864,7 @@ class Stack(collections.Mapping):
|
||||
message=encodeutils.safe_decode(six.text_type(ex)))
|
||||
if result:
|
||||
raise exception.StackValidationFailed(message=result)
|
||||
eventlet.sleep(0)
|
||||
|
||||
for op_name, output in six.iteritems(self.outputs):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user