-
Notifications
You must be signed in to change notification settings - Fork 4.1k
*: spans that are never explicitly Finish()-ed #58721
Copy link
Copy link
Closed
Labels
Description
Consider the following two examples (there may be others, will need to audit more thoroughly):
cockroach/pkg/sql/conn_executor_exec.go
Lines 633 to 639 in 91a0898
| var stmtThresholdSpan *tracing.Span | |
| alreadyRecording := ex.transitionCtx.sessionTracing.Enabled() | |
| stmtTraceThreshold := traceStmtThreshold.Get(&ex.planner.execCfg.Settings.SV) | |
| if !alreadyRecording && stmtTraceThreshold > 0 { | |
| ctx, stmtThresholdSpan = createRootOrChildSpan(ctx, "trace-stmt-threshold", ex.transitionCtx.tracer) | |
| stmtThresholdSpan.SetVerbose(true) | |
| } |
cockroach/pkg/sql/colflow/vectorized_flow.go
Line 949 in 91a0898
| ctx, span := tracing.ChildSpanRemote(ctx, "") |
The created spans are never explicitly Finish()-ed. This may pose to be a problem with always-on tracing (#55592), where un-Finish()-ed spans take up room in an in-memory registry of active spans (#58490). This is a tracking issue to refer to as we fix these.
Reactions are currently unavailable