8000 *: spans that are never explicitly Finish()-ed · Issue #58721 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
*: spans that are never explicitly Finish()-ed #58721
Closed
@irfansharif

Description

@irfansharif

Consider the following two examples (there may be others, will need to audit more thoroughly):

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)
}

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0