Repository navigation
feat: add per-invocation executor isolation - #735
Draft
zhongkechen wants to merge 13 commits into
Draft
zhongkechen wants to merge 13 commits into
zhongkechen wants to merge 13 commits into
Conversation
zhongkechen
added this pull request to stack #732
September 25, 2026 17:28
zhongkechen
force-pushed
the
feature/invocation-executor-isolation
branch
from
September 29, 2026 17:49
5433d65 to
703c7e0
Compare
zhongkechen
force-pushed
the
feature/invocation-executor-isolation
branch
from
September 29, 2026 22:18
703c7e0 to
241c152
Compare
zhongkechen
force-pushed
the
feature/invocation-executor-isolation
branch
from
September 29, 2026 22:24
241c152 to
e00c900
Compare
This was referenced Oct 16, 2026
3 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Link, if available
Partial fix for #726, stacked on #733. Arbitrarily nested bounded-pool starvation remains unresolved.
Description
Concurrent LMI invocations sharing a bounded executor can occupy every worker with roots that wait for queued steps.
withInvocationExecutorFactory(...)gives each invocation a fresh executor for its root, steps, child contexts, and coordinators. ExistingwithExecutorService(...)executors remain caller-owned and shared.The updated stack preserves main's handler-owned Start/End lifecycle. Both plain and plugin-enabled roots use the selected executor. The runtime caller shuts down an invocation-owned executor after normal root/End completion, so cleanup cannot wait for its own worker. Termination uses the remaining cleanup budget; the additional reserve applies only to owned executors. User code that ignores interruption can outlive that budget.
DurableConfig.toBuilder()preserves the factory and resolved plugin configuration. The local test runner therefore obtains a new executor on replay/resume without rediscovering providers. The factory must return a fresh, non-null, usable executor; overlapping reuse of an executor identity and configuring both executor modes are rejected.The LMI
fixed2fixture uses per-invocation fixed(2) pools. The sharednested2fixture remains available for diagnosis and is not presented as solved by invocation isolation.Validation
11b17912includes upstream main67bad28cand declared base fix: apply invocation deadlines to SDK waits and cleanup #733242b88fc; all original PR history is retained.The focused public controls verify that plugin Start/End run on the owned worker, the caller waits for End before shutdown, rejected roots close their owned executor with or without plugins, and replay/resume preserves the configured factory. Inherited observation gates recognize the real budgeted waits; their lifecycle, MDC, and admission assertions are unchanged.
No new deployed LMI acceptance run is claimed for this implementation. This PR remains Draft, targeting #733's
fix/lmi-invocation-lifecyclebranch; merge the stack in order before retargeting this PR to main.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.