From 0b629ce5a575e24a530633f5814c808aca2aa300 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 25 May 2024 22:13:32 +0200 Subject: [PATCH] lib/logstorage: re-use per-shard fields across processed blocks in pipePackJSON and pipeUnroll --- lib/logstorage/pipe_pack_json.go | 1 + lib/logstorage/pipe_unroll.go | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/logstorage/pipe_pack_json.go b/lib/logstorage/pipe_pack_json.go index 1f3e6191b..ef647f6ec 100644 --- a/lib/logstorage/pipe_pack_json.go +++ b/lib/logstorage/pipe_pack_json.go @@ -104,6 +104,7 @@ func (ppp *pipePackJSONProcessor) writeBlock(workerID uint, br *blockResult) { v := bytesutil.ToUnsafeString(buf[bufLen:]) shard.rc.addValue(v) } + shard.fields = fields br.addResultColumn(&shard.rc) ppp.ppNext.writeBlock(workerID, br) diff --git a/lib/logstorage/pipe_unroll.go b/lib/logstorage/pipe_unroll.go index 0de54fd47..e1e4e3be9 100644 --- a/lib/logstorage/pipe_unroll.go +++ b/lib/logstorage/pipe_unroll.go @@ -201,6 +201,7 @@ func (shard *pipeUnrollProcessorShard) writeUnrolledFields(br *blockResult, fiel } shard.wctx.writeRow(rowIdx, fields) } + shard.fields = fields } func (pup *pipeUnrollProcessor) flush() error {