You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have proc_mesh.stop try to cleanly exit actors (#1717)
Summary:
Pull Request resolved: #1717
Non-local processes that are being stopped with v1 `proc_mesh.stop()` go right
to SIGTERM, and don't give actors a chance to stop themselves. LocalHandle processes use
"destroy_and_wait" already.
That didn't matter a lot before, but we'd like for Actors to have a chance to run cleanups
in Drop, and in the future the `Actor::cleanup` trait function.
This change asks the ProcMeshAgent to stop the actors on the proc before sending a
SIGTERM, which gives a chance for more cooperative cleanup. Note that the process still
gets SIGTERM, as "destroy_and_wait" (and by extension, the StopAll message) does not exit
the process. We make sure to `await` the StopAll message response, so that we don't
try to SIGTERM actors that are already stopping.
Reviewed By: shayne-fletcher
Differential Revision: D85795859
fbshipit-source-id: 6b4ec9a0f545ed51aaaa353bceef2e16ab0547dc
0 commit comments