This commit is contained in:
Aliaksandr Valialkin 2024-05-30 19:27:44 +02:00
parent d6ee42e7e6
commit b21c39a871
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -57,7 +57,6 @@ func updateNeededFieldsForUnpackPipe(fromField string, outFields []string, keepO
} }
type fieldsUnpackerContext struct { type fieldsUnpackerContext struct {
workerID uint
fieldPrefix string fieldPrefix string
fields []Field fields []Field
@ -65,7 +64,6 @@ type fieldsUnpackerContext struct {
} }
func (uctx *fieldsUnpackerContext) reset() { func (uctx *fieldsUnpackerContext) reset() {
uctx.workerID = 0
uctx.fieldPrefix = "" uctx.fieldPrefix = ""
uctx.resetFields() uctx.resetFields()
uctx.a.reset() uctx.a.reset()
@ -76,10 +74,9 @@ func (uctx *fieldsUnpackerContext) resetFields() {
uctx.fields = uctx.fields[:0] uctx.fields = uctx.fields[:0]
} }
func (uctx *fieldsUnpackerContext) init(workerID uint, fieldPrefix string) { func (uctx *fieldsUnpackerContext) init(fieldPrefix string) {
uctx.reset() uctx.reset()
uctx.workerID = workerID
uctx.fieldPrefix = fieldPrefix uctx.fieldPrefix = fieldPrefix
} }
@ -157,7 +154,7 @@ func (pup *pipeUnpackProcessor) writeBlock(workerID uint, br *blockResult) {
shard := &pup.shards[workerID] shard := &pup.shards[workerID]
shard.wctx.init(workerID, pup.ppNext, pup.keepOriginalFields, pup.skipEmptyResults, br) shard.wctx.init(workerID, pup.ppNext, pup.keepOriginalFields, pup.skipEmptyResults, br)
shard.uctx.init(workerID, pup.fieldPrefix) shard.uctx.init(pup.fieldPrefix)
bm := &shard.bm bm := &shard.bm
bm.init(len(br.timestamps)) bm.init(len(br.timestamps))
@ -234,6 +231,7 @@ func (wctx *pipeUnpackWriteContext) reset() {
wctx.workerID = 0 wctx.workerID = 0
wctx.ppNext = nil wctx.ppNext = nil
wctx.keepOriginalFields = false wctx.keepOriginalFields = false
wctx.skipEmptyResults = false
wctx.brSrc = nil wctx.brSrc = nil
wctx.csSrc = nil wctx.csSrc = nil