Make collectAll, collectAllRange, collectAllWindowed consistently rethrow...
Make collectAll, collectAllRange, collectAllWindowed consistently rethrow exception from first failure Summary: The void-returning variants of collectAllRange() and collectAllWindowed() were previously failing with the error from the first task to fail whereas the other variants of collectAll() were failing with an arbitrary error (typically first by argument order) in the case of multiple errors. This was problematic because after the first task failed it requests cancellation of the other tasks, which then often will complete with an 'OperationCancelled' error. This mean that, unless the original error occurred on the first failed task in argument order, the error that caused the cancellation would be discarded and instead, the collectAll() operation would result in an 'OperationCancelled' error. This change updates those algorithms to now consistently fail with the error from the first task to fail (in time) as this error will typically be the most useful in determining the root cause of the failure. Also it now discards any errors that occur in child tasks if they fail after cancellation was requested on the parent task. In this case the collectAll() will complete with an 'OperationCancelled' error. Also made a few drive-by changes to avoid rethrowing exceptions where possible by using `co_yield co_error(e)`. Reviewed By: yfeldblum Differential Revision: D21681812 fbshipit-source-id: dfe15d0672dcbdeb4e156962cdffe767ddf91a0b
Showing
This diff is collapsed.
Please register or sign in to comment