mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage/raw_row: properly initialize TS for tmp blocks (#5762)
Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
This commit is contained in:
parent
442bd6dc7a
commit
25f83e6c54
1 changed files with 2 additions and 0 deletions
|
@ -118,6 +118,7 @@ func (rrm *rawRowsMarshaler) marshalToInmemoryPart(mp *inmemoryPart, rows []rawR
|
||||||
|
|
||||||
rrm.auxValues, scale = decimal.AppendFloatToDecimal(rrm.auxValues[:0], rrm.auxFloatValues)
|
rrm.auxValues, scale = decimal.AppendFloatToDecimal(rrm.auxValues[:0], rrm.auxFloatValues)
|
||||||
tmpBlock.Init(tsid, rrm.auxTimestamps, rrm.auxValues, scale, precisionBits)
|
tmpBlock.Init(tsid, rrm.auxTimestamps, rrm.auxValues, scale, precisionBits)
|
||||||
|
tmpBlock.fixupTimestamps()
|
||||||
rrm.bsw.WriteExternalBlock(tmpBlock, ph, &rowsMerged)
|
rrm.bsw.WriteExternalBlock(tmpBlock, ph, &rowsMerged)
|
||||||
|
|
||||||
tsid = &r.TSID
|
tsid = &r.TSID
|
||||||
|
@ -128,6 +129,7 @@ func (rrm *rawRowsMarshaler) marshalToInmemoryPart(mp *inmemoryPart, rows []rawR
|
||||||
|
|
||||||
rrm.auxValues, scale = decimal.AppendFloatToDecimal(rrm.auxValues[:0], rrm.auxFloatValues)
|
rrm.auxValues, scale = decimal.AppendFloatToDecimal(rrm.auxValues[:0], rrm.auxFloatValues)
|
||||||
tmpBlock.Init(tsid, rrm.auxTimestamps, rrm.auxValues, scale, precisionBits)
|
tmpBlock.Init(tsid, rrm.auxTimestamps, rrm.auxValues, scale, precisionBits)
|
||||||
|
tmpBlock.fixupTimestamps()
|
||||||
rrm.bsw.WriteExternalBlock(tmpBlock, ph, &rowsMerged)
|
rrm.bsw.WriteExternalBlock(tmpBlock, ph, &rowsMerged)
|
||||||
if rowsMerged != uint64(len(rows)) {
|
if rowsMerged != uint64(len(rows)) {
|
||||||
logger.Panicf("BUG: unexpected rowsMerged; got %d; want %d", rowsMerged, len(rows))
|
logger.Panicf("BUG: unexpected rowsMerged; got %d; want %d", rowsMerged, len(rows))
|
||||||
|
|
Loading…
Reference in a new issue