When is resource is waiting for its dependencies to resolve, it first informs the RPC_MANAGER that it intends to do an RPC - this is to prevent premature termination of the program while RPCs are still in flight or queued to execute. However, this is a problem whenever a resource fails to create for whatever reason. The most common ways for this to happen are for invokes to fail, resource creation itself to fail, or throwing in an apply. Today, this causes a deadlock, since all consumers of the failed resources block forever while never decrementing the RPC count. This commit addresses the issue by deliberately (abnormally) resolving all futures that are created in the process of preparing a resource. This solves the problem by immediately terminating all resources that are waiting for the failed resource's outputs to resolve - they resolve immediately, and exceptionally. The end result is now that, instead of deadlocking, a doomed program now terminates as expected with a single exception message. |
||
---|---|---|
.. | ||
go | ||
nodejs | ||
proto | ||
python | ||
README.md |