Skip to content

Fix Vert.x HTTP/2 test response body race - #13102

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
dd/fix-vertx-http2-body-race-bew2hq
Oct 29, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
dd/fix-vertx-http2-body-race-bew2hq

Conversation

@cgcote

@cgcote cgcote commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Workflow Automation • View in Workflow Automation

  • Collect the HTTP/2 response status and UTF-8 body through a dedicated collectResponse helper composed directly from request.send() inside the request callback.
  • Subscribe to body collection on the event loop before returning the collected response to the test thread.
  • Preserve every wrapping assertion and the existing 10-second bounds.

Motivation

The HTTP/2 end-handler instrumentation test could subscribe after Vert.x had already discarded response data, producing an empty body despite HTTP 200. The reported 7.93% failure rate affected 72 pipelines and consumed approximately 92 hours of CI time. Registering body collection directly within the request callback removes the cross-thread subscription race while keeping the future chain readable.

Additional Notes

The change is limited to the affected test. Inspection of the module and sibling Vert.x modules found no other equivalent late response-body subscriptions. No production instrumentation changes or permanent repetition annotations are included.

Testing

  • Initial regression validation reproduced 69 empty-body assertion failures in 200 HTTP/2 repetitions of the original code on JDK 21.
  • The final helper-based implementation passed 200 HTTP/2 repetitions on each of JDK 17, 21, and 25 in latestDepTest; the HTTP/1 sibling also passed on every JDK, with no skipped tests.
  • Disabling Vert.x instrumentation through temporary class-level test configuration made both tests fail with HTTP 500 and nonempty bodies identifying the unwrapped application handler.
  • After removing all temporary validation edits, the targeted latestDepTest class passed both tests on JDK 21.
  • Java formatting was applied and verified using the cached, pinned google-java-format 1.36.1. Full Spotless provisioning was previously blocked by HTTP 502 while fetching Eclipse formatter dependencies from download.eclipse.org and was not rerun for this refinement.

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Once approved, use merge queue to merge the PR

PR by Bits - View session in Datadog

Comment @DataDog to request changes

Co-authored-by: cgcote <5115638+cgcote@users.noreply.github.com>
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@dd-octo-sts

dd-octo-sts Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.99 s 13.90 s [-0.1%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 12.92 s 13.00 s [-1.3%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 17.18 s 16.44 s [+0.3%; +8.8%] (maybe worse)
startup:petclinic:iast:Agent 16.96 s 17.12 s [-1.7%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 16.85 s 16.98 s [-1.8%; +0.4%] (no difference)
startup:petclinic:sca:Agent 17.11 s 16.97 s [+0.0%; +1.7%] (maybe worse)
startup:petclinic:tracing:Agent 16.19 s 16.18 s [-0.9%; +1.1%] (no difference)

Commit: bd7f4e05 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@cgcote
cgcote marked this pull request as ready for review October 28, 2026 10:11
@cgcote
cgcote requested a review from a team as a code owner October 28, 2026 10:11
@cgcote
cgcote requested review from ygree and removed request for a team October 28, 2026 10:11
@dd-octo-sts

dd-octo-sts Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T10:12:42.582449Z 0dd8a99 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-28T10:14:37.541122Z 0dd8a99 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dd-octo-sts dd-octo-sts Bot added tag: ai generated Largely based on code generated by an AI or LLM and removed Bits AI labels Oct 28, 2026

@datadog-prod-us1-4 datadog-prod-us1-4 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Collecting the HTTP/2 response body within the Vert.x future chain addresses the late-subscription race while retaining the wrapping assertions. The completed static review identified no actionable regression.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 0dd8a99

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 59.47% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: bd7f4e0 | Docs | Give us feedback!

@cgcote cgcote added the inst: vertx Eclipse Vert.x instrumentation label Oct 28, 2026
@amarziali amarziali added type: bug fix Bug fix tag: no release notes Changes to exclude from release notes labels Oct 28, 2026

@ygree ygree left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! IDM approved with one suggestion.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix, proposed a bit more readable version of the same.
@ygree WDYT?

Co-authored-by: cgcote <5115638+cgcote@users.noreply.github.com>
@cgcote
cgcote added this pull request to the merge queue Oct 29, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-29 13:39:57 UTC ℹ️ Start processing command /merge


2026-10-29 13:40:02 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-10-29 14:37:35 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit d58daad into master Oct 29, 2026
624 of 628 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the dd/fix-vertx-http2-body-race-bew2hq branch October 29, 2026 14:37
@github-actions github-actions Bot added this to the 1.69.0 milestone Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: vertx Eclipse Vert.x instrumentation tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants