Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
The two most critical issues are a production memory-retention bug in PollerInstrumentation where request context leaks into long-lived poller threads when the scope-depth limit is reached, and a test compatibility failure in PollerContextForkedTest that throws NoSuchFieldException on JDK 22 due to a missing POLLERS field.
🤖 Bits Code Review · Commit 99ccea5 · @DataDog review to ask questions
🟢 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. |
|
@DataDog review |
There was a problem hiding this comment.
What Does This Do
Prevent long-lived JDK infrastructure threads from inheriting the request that happens to create them:
Motivation
irst-use initialization under an active request could capture that request in permanent
SubPollerthreads. JDK 26’s virtual HTTP selector could also retain its creating request for the client’s lifetime.These threads do not belong to the request, and their continuations cannot be released until they terminate. The smoke-test continuation diagnostic exposed both paths.
Simply disabling async capture is insufficient: virtual-thread instrumentation also saves the raw context independently.
flowchart TD A[Active request] --> B[Create HTTP client] B --> C[Virtual selector] C --> D[Initialize shared I/O pollers] D --> E[Permanent virtual pollers] C -. Before: retains request .-> F[Request context and continuation] E -. Before: retains request .-> F C --> G[After: no inherited request] D --> H[After: initialize under root context] style F fill:#ffdddd,stroke:#cc3333 style G fill:#ddffdd,stroke:#339933 style H fill:#ddffdd,stroke:#339933Additional 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 issueJira ticket: [PROJ-IDENT]