Fine tune async propagation for lettuce 5#11607
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
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".
|
@codex review |
There was a problem hiding this comment.
💡 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".
🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)
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. |
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
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]