mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
46bfdf6796
commit
a4d5ef8382
2 changed files with 10 additions and 7 deletions
|
@ -116,7 +116,7 @@ func (pep *pipeExtractProcessor) writeBlock(workerID uint, br *blockResult) {
|
|||
}
|
||||
|
||||
shard := &pep.shards[workerID]
|
||||
shard.wctx.init(br, pep.ppBase)
|
||||
shard.wctx.init(workerID, br, pep.ppBase)
|
||||
ef := shard.ef
|
||||
|
||||
bm := &shard.bm
|
||||
|
|
|
@ -86,7 +86,7 @@ func (pup *pipeUnpackProcessor) writeBlock(workerID uint, br *blockResult) {
|
|||
}
|
||||
|
||||
shard := &pup.shards[workerID]
|
||||
shard.wctx.init(br, pup.ppBase)
|
||||
shard.wctx.init(workerID, br, pup.ppBase)
|
||||
|
||||
bm := &shard.bm
|
||||
bm.init(len(br.timestamps))
|
||||
|
@ -137,9 +137,10 @@ func (pup *pipeUnpackProcessor) flush() error {
|
|||
}
|
||||
|
||||
type pipeUnpackWriteContext struct {
|
||||
brSrc *blockResult
|
||||
csSrc []*blockResultColumn
|
||||
ppBase pipeProcessor
|
||||
workerID uint
|
||||
brSrc *blockResult
|
||||
csSrc []*blockResultColumn
|
||||
ppBase pipeProcessor
|
||||
|
||||
rcs []resultColumn
|
||||
br blockResult
|
||||
|
@ -152,6 +153,7 @@ type pipeUnpackWriteContext struct {
|
|||
}
|
||||
|
||||
func (wctx *pipeUnpackWriteContext) reset() {
|
||||
wctx.workerID = 0
|
||||
wctx.brSrc = nil
|
||||
wctx.csSrc = nil
|
||||
wctx.ppBase = nil
|
||||
|
@ -166,9 +168,10 @@ func (wctx *pipeUnpackWriteContext) reset() {
|
|||
wctx.valuesLen = 0
|
||||
}
|
||||
|
||||
func (wctx *pipeUnpackWriteContext) init(brSrc *blockResult, ppBase pipeProcessor) {
|
||||
func (wctx *pipeUnpackWriteContext) init(workerID uint, brSrc *blockResult, ppBase pipeProcessor) {
|
||||
wctx.reset()
|
||||
|
||||
wctx.workerID = workerID
|
||||
wctx.brSrc = brSrc
|
||||
wctx.csSrc = brSrc.getColumns()
|
||||
wctx.ppBase = ppBase
|
||||
|
@ -228,7 +231,7 @@ func (wctx *pipeUnpackWriteContext) flush() {
|
|||
br := &wctx.br
|
||||
br.setResultColumns(rcs, wctx.rowsCount)
|
||||
wctx.rowsCount = 0
|
||||
wctx.ppBase.writeBlock(0, br)
|
||||
wctx.ppBase.writeBlock(wctx.workerID, br)
|
||||
br.reset()
|
||||
for i := range rcs {
|
||||
rcs[i].resetValues()
|
||||
|
|
Loading…
Reference in a new issue