Repository navigation
fix(gax): make CompositeTracer completion-callback scoping best-effort - #15121
jinseopkim0 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates CompositeTracer to handle exceptions thrown when entering or closing tracer scopes during completion callbacks, preventing RPC futures from hanging or skipping remaining callbacks. It also introduces comprehensive tests to verify this behavior. The review feedback highlights two main points: first, a suggestion to reorder assertions in the test to prevent potential flakiness from asynchronous execution; second, a concern that using a static JVM-wide AtomicBoolean to suppress duplicate warning logs could inadvertently hide critical tracer failures in other parts of the application.
|
|





If a child
ApiTracerthrows frominScope()orScope.close()duringCompositeTracercompletion callbacks, the exception can escapeBasicRetryingFuture.handleAttemptand leave the RPC future incomplete forever, or skip sibling operation callbacks.Wraps completion-callback scoping in a best-effort
enterCallbackScope()helper that logs the first failure atWARNING(and subsequent ones atFINE) and dispatches callbacks without the scope, leaving publicinScope()behavior unchanged. Adds 19 regression tests covering all 9 scoped callbacks and the end-to-end retrying future path.b/499388983