Skip to content

Fine tune async propagation for lettuce 5#11607

Open
amarziali wants to merge 3 commits into
masterfrom
andrea.marziali/lettuce-5-async-prop
Open

Fine tune async propagation for lettuce 5#11607
amarziali wants to merge 3 commits into
masterfrom
andrea.marziali/lettuce-5-async-prop

Conversation

@amarziali

@amarziali amarziali commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

This PR blocks async propagations around the connection boundary in lettuce. Previously, the latestDepTest had a strictTraceWrites set to false since continuations were leaked from few tests.

This PR simply avoid that we capture a state when connecting that we won't release in case of errors. I also added the netty-promise module in testing since lettucy is heavily using it and it's worth testing with it.

Motivation

Additional Notes

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
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /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)
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

@amarziali amarziali added type: bug Bug report and fix inst: lettuce Lettuce instrumentation labels Jun 9, 2026
@datadog-prod-us1-5

This comment has been minimized.

@amarziali amarziali marked this pull request as ready for review June 9, 2026 21:56
@amarziali amarziali requested a review from a team as a code owner June 9, 2026 21:56
@amarziali amarziali requested review from vandonr and removed request for a team June 9, 2026 21:56

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review


P2 Badge Disable propagation for connect callbacks

When connect/connectAsync is called while an application span is active, this whenComplete registration now runs with the connect span no longer active but with async propagation still enabled. Since ConnectionFuture is a completable future, the java-concurrent instrumentation can capture the caller's active span for this Datadog-internal completion callback, keeping that continuation alive until the connection attempt completes and reactivating it just to finish the connect span; slow or failed connects can therefore leak/delay the caller trace. The command path added a propagation guard around its own whenComplete, and the connect path needs the same guard here.

ℹ️ 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".

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".

@amarziali

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfcbd9b949

ℹ️ 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".

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".

@dd-octo-sts

dd-octo-sts Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

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.94 s 13.97 s [-1.3%; +0.9%] (no difference)
startup:insecure-bank:tracing:Agent 12.89 s 13.00 s [-1.6%; -0.1%] (maybe better)
startup:petclinic:appsec:Agent 17.61 s 17.35 s [+0.2%; +2.7%] (maybe worse)
startup:petclinic:iast:Agent 17.47 s 17.42 s [-0.7%; +1.3%] (no difference)
startup:petclinic:profiling:Agent 17.62 s 17.52 s [-0.8%; +1.8%] (no difference)
startup:petclinic:sca:Agent 17.50 s 17.45 s [-0.7%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.66 s 16.53 s [-0.6%; +2.1%] (no difference)

Commit: bfcbd9b9 · 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: lettuce Lettuce instrumentation type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant