Skip to content

Commit

Permalink
tracing: remove stale TODO
Browse files Browse the repository at this point in the history
This TODO implied that orphaned spans (spans whose parent is
Finish()ing) are not made part of the active spans registry. But they
are, just above the TODO.

Release note: None
  • Loading branch information
andreimatei committed Nov 18, 2021
1 parent ca304f1 commit d60e17a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/util/tracing/crdbspan.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,13 @@ func (s *crdbSpan) finish() bool {
parent.childFinished(s)
}

// Deal with the orphaned children - make them roots.
for _, c := range children {
c.parentFinished()
}

// Atomically replace s in the registry with all of its still-open children.
s.tracer.activeSpansRegistry.swap(s.spanID, children)

// TODO(andrei): All the children that are still open are getting orphaned by
// the finishing of this parent. We should make them all root spans and
// register them with the active spans registry.
return true
}

Expand Down

0 comments on commit d60e17a

Please sign in to comment.