mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
d6ee42e7e6
commit
b21c39a871
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue