Ignore capturing connection continuation for armeria#11657
Conversation
This comment has been minimized.
This comment has been minimized.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🟢 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. |
dougqh
left a comment
There was a problem hiding this comment.
The fix is good as is, but we are drifting into the types of async changes that I feared.
If we adopted the async model that I proposed, this fix would be simpler. ConnectAdvice.OnEnter is a context capture step, it forks the calling context into a continuation expecting a corresponding execute step when the first request is written. For Armeria and reused HTTP/2 connections, no execution ever runs leaving a dangling fork. The consumer attribute is compensating for that.
The proposed context model tolerates unconsumed forks, so cancellation is effectively automatic. Obviously, that's a larger change, but something to consider before we make these changes everywhere.
c8c4ca8 to
d7fc6b5
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What Does This Do
Armeria lazily builds its HttpChannelPool on the first request (so the request span is active), and the pool's CompletableFuture close-handler captured that span. It only completes at pool shutdown and the trace stayed pinned for the whole pool lifetime.
Also, netty's ConnectAdvice captures the active span on connect, expecting our http client handler to consume it. Armeria runs its own codec/pipeline, so nothing ever consumed it.
This PR disable capturing continuations for the two cases and rolls back the previous attempt to overhaul largely speaking the netty captures since it had side effects on ratpack.
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)Jira ticket: [PROJ-IDENT]