Avoid leaking continuations on google pubsub instrumentation#11605
Avoid leaking continuations on google pubsub instrumentation#11605amarziali wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
🟢 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. |
2d25102 to
b8d6556
Compare
|
[Claude] The |
|
[Claude] |
dougqh
left a comment
There was a problem hiding this comment.
Claude raised one minor concern. I'll leave that to your discretion.
it's a project convention to do new tests perhaps in java but I won't engage a migration just for the fact that I removed a method override |
Well I did an exercise before opening this PR. I removed the exclusions of type EXECUTOR and the tests were failing. This is because they apply at the executor-submission instrumentation boundary, where the agent decides whether to attach continuation state for work submitted through an executor. So it's not a matter because those classes are or not a instanceof Executor but because they are submitted through executors. |
What Does This Do
Fix Pub/Sub strict trace writes by avoiding async continuation capture for internal GAX/PubSub callbacks that do not represent application work. The Pub/Sub tests no longer need
useStrictTraceWrites() == false: strict mode was failing because internal retry/listener callbacks could capture continuations from the publish span and resolve too late, or never resolve, leaving the writer waiting on orphaned work.This has been detected with an experimental (unreleased) diagnostic tool to track continuation leakage. The diagnostic message was
That showed the continuation was captured by GAX retry/listener machinery, not by user-visible async work.
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]