Repository navigation
Conversation
Contributor
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
mcculls
force-pushed
the
mcculls/context-capture-flag
branch
2 times, most recently
from
November 12, 2026 12:21
9fe310d to
b54643f
Compare
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (355.797 µs) : 311, 401
. : milestone, 356,
basic (328.693 µs) : 324, 334
. : milestone, 329,
loop (8.097 ms) : 8034, 8160
. : milestone, 8097,
section candidate
noprobe (346.408 µs) : 321, 371
. : milestone, 346,
basic (328.987 µs) : 324, 334
. : milestone, 329,
loop (8.099 ms) : 8037, 8162
. : milestone, 8099,
|
mcculls
force-pushed
the
mcculls/context-capture-flag
branch
3 times, most recently
from
November 15, 2026 21:59
37cdab0 to
34527ff
Compare
gh-worker-dd-mergequeue-cf854d
Bot
force-pushed
the
mcculls/context-capture-flag
branch
from
November 16, 2026 16:59
34527ff to
360e090
Compare
Introduce Context capture controls as the migration target for legacy async-propagation callers, retaining scope-stack-backed behavior through the legacy adapter. Disabled capture returns a no-op continuation; direct context installation remains possible. Attaching or resuming a different context resets flags, enabling capture; closing its scope restores the previous flags. Reattaching the current context leaves flags unchanged. Introduce ContextHandle and checkpoint() to save a context and execution-unit flags without changing the active context or keeping a trace open. Move swap() to ContextHandle and return a ContextHandle rather than a Context; the legacy ScopeContext now implements ContextHandle instead of Context. Swapping to a different context resets flags or restores those saved in a checkpoint. The returned handle checkpoints the displaced context. Same-context swaps leave flags unchanged. Use checkpoint handles across coroutine, fiber, actor, and poller context switches. Coroutines and ZIO fibers continue the launching logical flow, so their non-legacy initial checkpoints preserve its flags across scheduling boundaries. Legacy-mode checkpoints seed independent scope stacks for initial installation and restore live scope boundaries when returning to a displaced caller on the same thread. Their continuations retain the trace when capture is enabled. Virtual threads start new execution units, so they begin with a raw context and capture enabled, independently of temporary suppression in the creator. Flags set within the virtual thread persist across remounts. Make Akka and Pekko HTTP handlers inherit the enclosing flow's capture flag. Use the Context capture controls in the OpenTelemetry shim so manual attachments also preserve suppression through the selected context manager. Cover capture suppression, attach and resume flag resets, scope restoration, checkpoints, cross-thread context switches, and custom context providers. Add agent-backed virtual-thread coverage for launch from enabled and suppressed parents, flag preservation across remounts, and isolation between parent and child flags. Update context tracking guidance and benchmarks for the expanded API.
mcculls
force-pushed
the
mcculls/context-capture-flag
branch
from
November 16, 2026 23:56
360e090 to
99f3227
Compare
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.
What Does This Do
Add capture controls and checkpoint handles so context switches preserve execution-unit flags. Attaching or resuming a different context enables capture; closing the scope restores the previous flags. Reattaching the current context leaves flags unchanged.
swap()now returns aContextHandlerather than aContext. Checkpoints save flags without keeping a trace open; continuations retain that responsibility.Motivation
Prepare instrumentation callers to migrate from legacy async-propagation controls to the Context API while keeping existing scope-stack behavior compatible. Capture suppression and context installation remain separate, so coroutine and fiber scheduling can preserve the context even when continuation capture is disabled.
Additional Notes
Stacked on #13310; targets
mcculls/context-attach-reset-async.Coroutines and ZIO fibers preserve the launching flow's flags. Virtual threads start with capture enabled and preserve their own flag changes across remounts. Akka/Pekko HTTP handlers and OTel manual attachments preserve surrounding capture suppression.
The legacy adapter seeds independent scope stacks for initial coroutine/fiber installation and restores the caller's live scope boundary when switching back on the same thread. This lets existing AWS checkpoint callers restore their original scopes.