Replies: 1 comment
-
Closing this for now, since this seems like a more general problem than I thought apollographql/router#4074 (comment). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been investigating an issue with some traces not getting closed in another repository and tracked it down to a tokio Mutex (with
tracing
feature enabled).If a
Mutex
is created within the context of a particular, "request" trace, and then stored in memory to be reused by other requests or traces, it seems like that first request's span will never be closed, since the Mutex and its innerresource_span
holds a "reference" (incremented the ref_count of the trace) to the parent span. (When using atracing-subscriber
)Wondering if this is a known gotcha, and whether we should be careful to hold a tokio Mutex across requests? If not, any other ideas besides using
const_new
or switching to astd::sync::Mutex
?Beta Was this translation helpful? Give feedback.
All reactions