From 8d1fda514429b4d0cbaa6784d2520e4fb21f34ac Mon Sep 17 00:00:00 2001 From: kruskal <99559985+kruskall@users.noreply.github.com> Date: Thu, 31 Aug 2023 17:28:31 +0200 Subject: [PATCH] fix: clone each event in the libbeat publisher processor --- internal/publish/pub.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/publish/pub.go b/internal/publish/pub.go index fdfac0be0a7..102b705f9c2 100644 --- a/internal/publish/pub.go +++ b/internal/publish/pub.go @@ -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)}) }