Skip to content

Commit

Permalink
fix: clone each event in the libbeat publisher processor
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall committed Aug 31, 2023
1 parent bd52e02 commit 15613a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/publish/pub.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ func (p *Publisher) Stop(ctx context.Context) error {
// publishing pipeline.
func (p *Publisher) ProcessBatch(ctx context.Context, batch *modelpb.Batch) error {
b := make(modelpb.Batch, len(*batch))
copy(b, *batch)
for i, e := range (*batch) {
cp := e.CloneVT()
b[i] = cp
}
return p.Send(ctx, PendingReq{Transformable: batchTransformer(b)})
}

Expand Down

0 comments on commit 15613a2

Please sign in to comment.