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 1882957585
commit 0b629ce5a5
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:])
shard.rc.addValue(v)
}
shard.fields = fields
br.addResultColumn(&shard.rc)
ppp.ppNext.writeBlock(workerID, br)

View File

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