Skip to content

Commit 9bc96c8

Browse files
committed
distsqlrun: fix panic due to multiple calls to tracing.FinishSpan
This commit removes calls to tracing.FinishSpan from the samplerProcessor and sampleAggregatorProcessor. These calls are no longer necessary after memory accounting was added in #39144, which includes a call to tracing.FinishSpan in InternalClose(). Fixes #39262 Release note: None
1 parent 74c2efe commit 9bc96c8

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

pkg/sql/distsqlrun/sample_aggregator.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ func (s *sampleAggregator) pushTrailingMeta(ctx context.Context) {
135135
func (s *sampleAggregator) Run(ctx context.Context) {
136136
s.input.Start(ctx)
137137
s.StartInternal(ctx, sampleAggregatorProcName)
138-
defer tracing.FinishSpan(s.span)
139138

140139
earlyExit, err := s.mainLoop(s.Ctx)
141140
if err != nil {

pkg/sql/distsqlrun/sampler.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"github.com/cockroachdb/cockroach/pkg/util/mon"
2727
"github.com/cockroachdb/cockroach/pkg/util/randutil"
2828
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
29-
"github.com/cockroachdb/cockroach/pkg/util/tracing"
3029
"github.com/cockroachdb/errors"
3130
)
3231

@@ -172,7 +171,6 @@ func (s *samplerProcessor) pushTrailingMeta(ctx context.Context) {
172171
func (s *samplerProcessor) Run(ctx context.Context) {
173172
s.input.Start(ctx)
174173
s.StartInternal(ctx, samplerProcName)
175-
defer tracing.FinishSpan(s.span)
176174

177175
earlyExit, err := s.mainLoop(s.Ctx)
178176
if err != nil {

0 commit comments

Comments
 (0)