Skip to content

Commit

Permalink
Remove ReturnToVTPool() calls
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Lopez Rubio <[email protected]>
  • Loading branch information
marclop committed Aug 8, 2024
1 parent 05e111e commit 24c6526
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions copy/apm-data/input/elasticapm/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,6 @@ func (p *Processor) handleStream(

// processBatch processes the batch and returns the events to the pool after it's been processed.
func (p *Processor) processBatch(ctx context.Context, processor modelpb.BatchProcessor, batch *modelpb.Batch) error {
defer func() {
for i := range *batch {
(*batch)[i].ReturnToVTPool()
}
}()
return processor.ProcessBatch(ctx, batch)
}

Expand Down
5 changes: 0 additions & 5 deletions x-pack/apm-server/sampling/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,6 @@ func (p *Processor) Run() error {
if err := p.config.BatchProcessor.ProcessBatch(gracefulContext, &events); err != nil {
p.logger.With(logp.Error(err)).Warn("failed to report events")
}

for i := range events {
events[i].ReturnToVTPool()
events[i] = nil // not required but ensure that there is no ref to the freed event
}
}
}
})
Expand Down

0 comments on commit 24c6526

Please sign in to comment.