better exception handling
commit04cc897c0393f4ad9c832b9b6154ec1e47397bb4
authorLucian Wischik <ljw@fb.com>
Fri, 11 Oct 2019 06:29:38 +0000 (10 23:29 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 11 Oct 2019 06:32:32 +0000 (10 23:32 -0700)
tree71b025fb888b615198f22b156d61fd8bf1b489d9
parent81fd3c14598278890bfa1a508169fc45f42fb44b
better exception handling

Summary:
This diff brings more careful exception-handling, including callstacks.

Objective: (1) if there's an unhandled exception on the worker, this should be reported to the orchestrator; (2) every error should have a callstack; (3) distinguish between "the prototype was absent to start with" and "the prototype got shut down part way through"

To achieve this I've modified the payload type that we send or receive over the orchestrator<->prototype fd. It's now a `rpc_payload`. This is either the intended message, or a structure that contains marshalable information about the unhandled exception.

The idea is that when the orchestrator next reads from the worker, rather than getting an Ok_payload, it'll get information about that unhandled exception.

Reviewed By: arxanas

Differential Revision: D17823547

fbshipit-source-id: c04c7741e480d4fa8d5b960ad1739e6b5bb5116d
hphp/hack/src/rearchitecture_proposal_1/hh_mapreduce/prototype.ml
hphp/hack/src/rearchitecture_proposal_1/hh_mapreduce/prototype.mli
hphp/hack/src/rearchitecture_proposal_1/hh_mapreduce/typecheck.ml