From 25f83e6c5455fa8f9f61484e912f34331e9012a6 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Wed, 7 Feb 2024 00:42:32 +0400 Subject: [PATCH] lib/storage/raw_row: properly initialize TS for tmp blocks (#5762) Signed-off-by: Zakhar Bessarab --- lib/storage/raw_row.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/storage/raw_row.go b/lib/storage/raw_row.go index 0f267da035..549774b196 100644 --- a/lib/storage/raw_row.go +++ b/lib/storage/raw_row.go @@ -118,6 +118,7 @@ func (rrm *rawRowsMarshaler) marshalToInmemoryPart(mp *inmemoryPart, rows []rawR rrm.auxValues, scale = decimal.AppendFloatToDecimal(rrm.auxValues[:0], rrm.auxFloatValues) tmpBlock.Init(tsid, rrm.auxTimestamps, rrm.auxValues, scale, precisionBits) + tmpBlock.fixupTimestamps() rrm.bsw.WriteExternalBlock(tmpBlock, ph, &rowsMerged) 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) tmpBlock.Init(tsid, rrm.auxTimestamps, rrm.auxValues, scale, precisionBits) + tmpBlock.fixupTimestamps() rrm.bsw.WriteExternalBlock(tmpBlock, ph, &rowsMerged) if rowsMerged != uint64(len(rows)) { logger.Panicf("BUG: unexpected rowsMerged; got %d; want %d", rowsMerged, len(rows))