Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

shayne-fletcher
Copy link
Contributor

Summary: implement bulk termination with config-driven timeout and concurrency. add MESH_TERMINATE_TIMEOUT and MESH_TERMINATE_CONCURRENCY attrs, define BulkTerminate with a TerminateSummary result, and implement it for both BootstrapProcManager (TERM → wait → KILL) and LocalProcManager (destroy_and_wait). add Display/Error impls for TerminateError and a Display impl for TerminateSummary. extend Host with terminate_children when its manager implements BulkTerminate, and route HostMesh::shutdown through ShutdownHost, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.

Differential Revision: D83599449

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 30, 2025
@facebook-github-bot
Copy link
Contributor

@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83599449.

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Sep 30, 2025
Summary:

implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.

refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net.

Differential Revision: D83599449
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Sep 30, 2025
Summary:

implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.

refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net.

Differential Revision: D83599449
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Sep 30, 2025
Summary:

implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.

refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net.

Differential Revision: D83599449
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 1, 2025
Summary:

implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.

refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net.

Differential Revision: D83599449
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 1, 2025
Summary:

implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.

refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net.

Differential Revision: D83599449
Copy link

meta-codesync bot commented Oct 1, 2025

@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83599449.

Summary:

implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.

refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net.

Differential Revision: D83599449
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 7f945af.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants