Repository navigation
Fix Jetty 9.0 continuation form-body test race - #12904
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
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. |
There was a problem hiding this comment.
More details
The early form parsing and committed-response guard are consistent with the inherited continuation tests. The added regression coverage preserves Expect: 100-continue while disabling HTTP retries; runtime behavior remains unverified.
🤖 Bits Code Review · Commit e4fbbd7
🟢 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. |
…9.0/src/test/groovy/datadog/trace/instrumentation/jetty9/JettyContinuationHandlerTest.groovy Co-authored-by: Alexey Kuznetsov <alexey.kuznetsov@datadoghq.com>
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Avoid an intermittent ReadPendingException in the Jetty 9.0.0 continuation
test handler by parsing URL-encoded forms before suspending the request.
If parsing commits a blocking response, mark the request handled and return
without suspending or dispatching it.
Add a regression test that sends 100 form requests with HTTP connection
retries disabled. It verifies response status and body, one trace per
request, converted-body tags, and async dispatch spans.
Only test code changes; production instrumentation is unchanged.
Motivation
The shared HTTP test client sends Expect: 100-continue for requests with a
body. This asks the server to acknowledge the request before the client
sends the body.
When form parsing happens after a continuation resumes, the body read can
overlap with Jetty 9.0.0's pending connection read and cause
ReadPendingException. Parsing before suspension avoids this timing.
Additional Notes
The regression test retains the Expect: 100-continue handshake while
disabling connection retries, so retries cannot hide request failures.
It runs under both HTTP naming conventions.
NOTE: This is a workaround in the test handler, not a fix to Jetty itself.