lib/logstorage: re-use per-shard fields across processed blocks in pipePackJSON and pipeUnroll

This commit is contained in:
Aliaksandr Valialkin 2024-05-25 22:13:32 +02:00
parent f02c5cb79a
commit 9edbeca46b
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB
2 changed files with 2 additions and 0 deletions

View file

@ -104,6 +104,7 @@ func (ppp *pipePackJSONProcessor) writeBlock(workerID uint, br *blockResult) {
v := bytesutil.ToUnsafeString(buf[bufLen:]) v := bytesutil.ToUnsafeString(buf[bufLen:])
shard.rc.addValue(v) shard.rc.addValue(v)
} }
shard.fields = fields
br.addResultColumn(&shard.rc) br.addResultColumn(&shard.rc)
ppp.ppNext.writeBlock(workerID, br) ppp.ppNext.writeBlock(workerID, br)

View file

@ -201,6 +201,7 @@ func (shard *pipeUnrollProcessorShard) writeUnrolledFields(br *blockResult, fiel
} }
shard.wctx.writeRow(rowIdx, fields) shard.wctx.writeRow(rowIdx, fields)
} }
shard.fields = fields
} }
func (pup *pipeUnrollProcessor) flush() error { func (pup *pipeUnrollProcessor) flush() error {